unkwntech Posted July 27, 2008 Share Posted July 27, 2008 This query: SELECT productName, productDesc, productPrice FROM products WHERE productDesc LIKE %1%2%3% OR color LIKE %1% OR size LIKE %1% OR color LIKE %2% OR size LIKE %2% OR color LIKE %3% OR size LIKE %3% is producing this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%1%2%3% OR color LIKE %1% OR size LIKE %1% OR color LIKE %2% OR size LIKE %2% OR' at line 1 Any help? Quote Link to comment Share on other sites More sharing options...
br0ken Posted July 27, 2008 Share Posted July 27, 2008 You need single brackets round the %1%2 parts. colour LIKE '%1%2' etc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.