If statement with sql query
Posted: Wed Aug 29, 2007 12:49 pm
I have the following code which i thought would carry out the $update query and if that didn't work (because the row matching the sql WHERE statement can't be found) the $insert query would be run. But the $insert is never carried out. What am i doing wrong?
Code: Select all
if (!mysql_query($updateprice,$con))
{
mysql_query($insertprice,$con);
}