Jump to content

SQL insert help


noclist

Recommended Posts

Would someone be able to tell me why I can't run a successful

mysql_query($sql)

with

$sql="INSERT INTO myDB.Titles (Title, Year, cID) values('". $title . "', '" . $year . "', '" . $cID . "')";

 

$sql echoes out to "INSERT INTO myDB.Titles (Title, Year, cID) values('Test', '2000', '2')"

It looks right but I'm probably off on the quotes somewhere. Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/219002-sql-insert-help/
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.