Forums
This topic is locked
Dreamweaver MX - Searching multiple fields
Posted 05 Oct 2004 19:36:22
1
has voted
05 Oct 2004 19:36:22 Rohit Rohit posted:
Using Dreamweaver MX and ASP, I am trying to create form and results page in which the user can select multiple checkbox options, which are displayed accordingly on the resulting page. Don't know whether my SQL query is right, but here it is:SELECT *
FROM Tools
WHERE Manufacturer LIKE '%var_manuBosch%' AND Manufacturer LIKE '%var_manuDeWalt%' AND Tool LIKE '%var_toolGrinder%' AND Tool LIKE '%var_toolScrewdriver%' AND Tool LIKE '%var_toolRecSaw%' AND Tool LIKE '%var_toolCircSaw%'
My default value for every variable is %
If I select more than one checkbox, this query returns no results.
Any advice? Thanks.
Replies
Replied 25 Oct 2004 23:23:01
25 Oct 2004 23:23:01 Elizabeth Martinez replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Using Dreamweaver MX and ASP, I am trying to create form and results page in which the user can select multiple checkbox options, which are displayed accordingly on the resulting page. Don't know whether my SQL query is right, but here it is:
SELECT *
FROM Tools
WHERE Manufacturer LIKE '%var_manuBosch%' AND Manufacturer LIKE '%var_manuDeWalt%' AND Tool LIKE '%var_toolGrinder%' AND Tool LIKE '%var_toolScrewdriver%' AND Tool LIKE '%var_toolRecSaw%' AND Tool LIKE '%var_toolCircSaw%'
My default value for every variable is %
If I select more than one checkbox, this query returns no results.
Any advice? Thanks.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Using Dreamweaver MX and ASP, I am trying to create form and results page in which the user can select multiple checkbox options, which are displayed accordingly on the resulting page. Don't know whether my SQL query is right, but here it is:
SELECT *
FROM Tools
WHERE Manufacturer LIKE '%var_manuBosch%' AND Manufacturer LIKE '%var_manuDeWalt%' AND Tool LIKE '%var_toolGrinder%' AND Tool LIKE '%var_toolScrewdriver%' AND Tool LIKE '%var_toolRecSaw%' AND Tool LIKE '%var_toolCircSaw%'
My default value for every variable is %
If I select more than one checkbox, this query returns no results.
Any advice? Thanks.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 25 Oct 2004 23:24:49
25 Oct 2004 23:24:49 Elizabeth Martinez replied:
Try, using OR instead of AND