mysql error catching

wxdqz

New Member
I have a .php script that taking information from TABLE 1 and using that data to update TABLE 2. It does this for many entries in TABLE 1.

I'm a little concerned that if one of the updates to TABLE 2 is unsuccessful (can't imagine a case where this would be true), I would like to undo all of the previous updates to TABLE 2.

Basically, I would like to be able to catch a mysql_query() error if it's unsuccessful and proceed by undo-ing all of the previous changes.

Is this possible?

Currently, I believe if an error occurs with mysql_query() that an error is shown on the browser window and the .php script exits.

Thanks!

Robbie
 
Back
Top