Hello Brian, Friday, April 23, 2004, 6:18:43 PM, you wrote:
BD> You have an error in your SQL syntax. Check the manual that corresponds BD> to your MySQL server version for the right syntax to use near BD> ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2' my_table should NOT be quoted in this instance and it causes the mysql error above. I just tried a query on a table and put the table name in quotes and it generated the exact same error. You can use back-ticks: ` but not the ' character which is what was in your post above. Also - wrapping field_1 in ' quotes ' DOES effect the outcome of the query, it should not have anything around it. If you wrap the field name in back-ticks that is fine. Unless the back-ticks have been converted to quotes by your email client automatically, that is most definitely the root of the problem. If PHPMyAdmin offers the ability to enter an execute a standard SQL statement - try it for yourself and you'll see what I mean. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php