I'm doing the following:And I'm getting an error on the fetch_array line. This works perfectly in MS SQL Server, but I'm trying to do with with MySQL for another project. I guess the question is, am I doing the initial insert correctly?PHP Code:$query1 = "INSERT [" . $ctype . "] DEFAULT VALUES";
$result1 = mysql_query($query1);
$query1 = "SELECT MAX(ID) FROM '" . $ctype . "'";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_array($result1);
echo "<p class=chatter>ID : " . $row1[0] . "<br>";
The idea is to insert the ID field and then update the rest of the fields where ID = "newly inserted ID"




Reply With Quote