Jump to content

mysql syntax?


ballhogjoni

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/59568-mysql-syntax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.