Jump to content

MySQL Insert


websteve

Recommended Posts

I am having a problem with SQL Insert. All of them work, except the last one (highlighted). If anyone has any idea what is going on, please let me know. Thanks. Code is below:

 

$gen="INSERT INTO general (ID, fname, lname, address, city, state) VALUES ('$cust_id','$fname','$lname','$address','$city','$state')";

mysql_query($gen) or die('Could not connect to general table: ' . mysql_error());

 

$pur="INSERT INTO Purchasing (ID, Item, Description, Quantity, Price) VALUES ('$cust_id','$item','$descr','$quantity','$price')";

mysql_query($pur)or die('Could not connect to Purchasing table: ' . mysql_error());

 

$cre="INSERT INTO Credit (ID, Credit_Card_Number, Expiration, Code) VALUES ('$cust_id','$credit_card_number','$expiration','$code')";

mysql_query($cre)or die('Could not connect to Credit table: ' . mysql_error());

$del="INSERT INTO Delivery (ID, Date, Time, AMPM) VALUES ('$cust_id','$date','$time','$ampm')";

mysql_query($del)or die('Could not connect to Delivery table: ' . mysql_error());

 

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