Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I'm having a problem with a PHP script on my web page that is intended to insert records into a ProductInfo relation and then into a Books relation. Here is the code:
$sql = "INSERT INTO ProductInfo(PID,ProductInfo,Price,Department) VALUES ($newPID,' ', $theprice,'Books')";
$sql = "INSERT INTO Books(ISBN, Title, PID, FNAME, LNAME, Condition) VALUES ($ISBNtextbox, $titletextbox, $newPID, $fnametextbox, $lnametextbox, $Conditiontextbox)";
$result = mysql_query($sql);
For some reason, it will insert into the ProductInfo but not into the Books relation. There are no obvioius errors for the user using the webpage, but when I go check the database there is a problem.
1. Does anyone know what's wrong?
2. Does anyone know anyway to check which errors the the MySql is encountering? The support from my webhost says that they don't have a MySql error log.
0 · ·