mysql transactions/rollback

From: Date: Thu, 18 Oct 2001 20:12:48 +0000
Subject: mysql transactions/rollback
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71522@lists.php.net to get a copy of this message
without save points and rollback what is the best way to replace all records for a user that might have been edited with their new values. I have read the mySQL manual about this. Update is out of the question (as the manual suggests). I can't track which ones changed, because they could have been reordered or overwritten. my approach which I know sucks is this: insert all the new records with a flag attached to each one. if insert goes ok, delete all the ones without the flag that belong to that user and turn flag off the newly inserted ones. this way if something happens in the insert, i still have the old data in there. as opposed to delete, than insert, and if insert fails, rollback before delete. I know there must be a common good solution to this. can someone please fill me in? TIA, Job __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com

« previous php.general (#71522) next »