Search results showing way to many results
| Author | Topic |
|---|---|
| andy bertaut Freaking Member Joined: 28 May 2005 Country: Posts: 52 | Posted: 08 Nov 2005 12:47:52 Hi Guys Hi Guys |
| Michael Behan Freaking Member ![]() Joined: 22 Jan 2005 Country: Ireland Posts: 71 | Posted: 08 Nov 2005 13:47:24 from my couple of test searches it seems to always return everything. from my couple of test searches it seems to always return everything.so it could be just something small in the name of the search field or where you use that in your recordset on the next page. if you post the code for the recordset here it will make it a bit easier to see exactly whats wrong. |
| andy bertaut Freaking Member Joined: 28 May 2005 Country: Posts: 52 | Posted: 08 Nov 2005 13:52:42 I should have done this from the off...here is the code for the recordset: I should have done this from the off...here is the code for the recordset:<% var rsSEARCH = Server.CreateObject("ADODB.Recordset" rsSEARCH.ActiveConnection = MM_connSLEVIN_STRING; rsSEARCH.Source = "SELECT ProductCode, Name, Brochuredescription FROM slevin_site WHERE Brochuredescription LIKE '%"+ rsSEARCH__MMColParam.replace(/'/g, "''" rsSEARCH.CursorType = 0; rsSEARCH.CursorLocation = 2; rsSEARCH.LockType = 1; rsSEARCH.Open(); var rsSEARCH_numRows = 0; %> |
| Michael Behan Freaking Member ![]() Joined: 22 Jan 2005 Country: Ireland Posts: 71 | Posted: 08 Nov 2005 14:39:40 can you also show the bit of code (usually appears just above the recordset code) that defines rsSEARCH__MMColParam can you also show the bit of code (usually appears just above the recordset code) that defines rsSEARCH__MMColParami reckon the problem will be to do with that. |
| andy bertaut Freaking Member Joined: 28 May 2005 Country: Posts: 52 | Posted: 08 Nov 2005 17:46:42 here ya go, thanks for the feedback: here ya go, thanks for the feedback:<% var rsSEARCH__MMColParam = "1"; if (String(Request.Form("SearchForm" String(Request.Form("SearchForm" rsSEARCH__MMColParam = String(Request.Form("SearchForm" } %> SearchForm is the name of the form the users use to search for products |
| Michael Behan Freaking Member ![]() Joined: 22 Jan 2005 Country: Ireland Posts: 71 | Posted: 08 Nov 2005 18:27:48 you have to use the name of the form field rather than the form itself. you have to use the name of the form field rather than the form itself.So if you change SearchForm to Search (I think this is what you called the search field) it should work. |
| andy bertaut Freaking Member Joined: 28 May 2005 Country: Posts: 52 | Posted: 09 Nov 2005 15:33:23 did u ever finally get it right and groan at your own stupidity???? Thanks Micheal, the second I read that i realised you were right and proceeded to call myself every idiot under the sun.did u ever finally get it right and groan at your own stupidity???? Thanks Micheal, the second I read that i realised you were right and proceeded to call myself every idiot under the sun. |
| Michael Behan Freaking Member ![]() Joined: 22 Jan 2005 Country: Ireland Posts: 71 | Posted: 10 Nov 2005 00:49:34 <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>did u ever finally get it right and groan at your own stupidity????<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote> <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>did u ever finally get it right and groan at your own stupidity????<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote> |
Posted: 08 Nov 2005 12:47:52











