ballhogjoni Posted July 12, 2007 Share Posted July 12, 2007 What would be the syntax of a mysql query when I want to pull the id and another specific column in a row. example: $sql = 'SELECT * FROM products WHERE id = '.$id.', boy = '.$_POST["boyGirl"]; right now I get 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 ' boy =' at line 1 SQL: SELECT * FROM products WHERE id = 5, boy = in /home/realfina/public_html/thediaperbakery/inc/mysql.class.php on line 107 Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 12, 2007 Share Posted July 12, 2007 WHERE id = '.$id.' AND boy = Quote Link to comment Share on other sites More sharing options...
trq Posted July 12, 2007 Share Posted July 12, 2007 You are aware that there is such a thing as the MySql manual? 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.