I am trying to update the last record inserted into the database but it appears that other records are actually being updated.
$getrec = "SELECT * from orders WHERE orderid = LAST_INSERT_ID(orders.orderid)";
$result = mysql_query($getrec);
$myrow = mysql_fetch_array($result);
$strUPDATE = "UPDATE orders SET
odprismbase ='$HTTP_POST_VARS[odprismbase]',
osspheresign ='$HTTP_POST_VARS[osspheresign]',
ossphere ='$HTTP_POST_VARS[osphere]',
oscylindersign ='$HTTP_POST_VARS[oscylindersign]',
oscylinder ='$HTTP_POST_VARS[oscylinder]'
WHERE orderid=$myorderid";
$result = mysql_query($strUPDATE, $db)
or print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
What am I doing wrong?