Hey gang, got one that stumped me...
extreme-computing.com
Go there and then do a search.. Right now you can only do one word at a time. Does anyone know of a valid SQL statement so that I can call for the multiple search terms all at once? I get a parse error when I try this:
"SELECT * FROM products WHERE prodName LIKE \"%ereg_replace(" ", "% OR prodName LIKE \"%", $search)%\";
(which, that is doing this.. say there are three search words entered there, then it would create the SQL statement saying:
SELECT * FROM products WHERE prodName LIKE "%searcTerm1%" OR prodName LIKE "%searchTerm2%" OR prodName LIKE "%searchTerm3%";
)
So, anyone have tips on why this is NOT working? it DOES work whenever it says something like
SELECT * FROM products WHERE prodName LIKE "%blah%" OR prodDesc LIKE "%blah%"
but it seems like having two instances of one field is tripping it up.. what should I do? Any suggestions? Thanks!
- Josh
extreme-computing.com
Go there and then do a search.. Right now you can only do one word at a time. Does anyone know of a valid SQL statement so that I can call for the multiple search terms all at once? I get a parse error when I try this:
"SELECT * FROM products WHERE prodName LIKE \"%ereg_replace(" ", "% OR prodName LIKE \"%", $search)%\";
(which, that is doing this.. say there are three search words entered there, then it would create the SQL statement saying:
SELECT * FROM products WHERE prodName LIKE "%searcTerm1%" OR prodName LIKE "%searchTerm2%" OR prodName LIKE "%searchTerm3%";
)
So, anyone have tips on why this is NOT working? it DOES work whenever it says something like
SELECT * FROM products WHERE prodName LIKE "%blah%" OR prodDesc LIKE "%blah%"
but it seems like having two instances of one field is tripping it up.. what should I do? Any suggestions? Thanks!
- Josh