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.