I have 4 queries that run on a post. I've noticed that not all the queries are working if one of the first queries have no work to do.
Here are my queries
mysql_query("UPDATE invoice SET company='$company' WHERE company='$oldcompanyname'") or die(mysql_error());
mysql_query("UPDATE bill SET customer='$company' WHERE customer='$oldcompanyname'") or die(mysql_error());
mysql_query("UPDATE project SET customer='$company' WHERE customer='$oldcompanyname'") or die(mysql_error());
mysql_query("INSERT INTO activity_log (item, date) VALUES ('Customer Editted', NOW()) ") or die(mysql_error());
To give you an example, the first one runs ok. But the second one has no work to do because the data in the field does not exist. The third and the fourth should run but they do not.
I have always been accustomed to appending my queries with "or die(mysql_error());" but I'm thinking now that is not the best choice. But shouldn't the remaining queries run even if the one in the middle has no work to do?
If there is work to be done in all 4, then it works fine.