Re: creating log files out of a delete statement

From: Date: Mon, 12 Apr 2004 00:23:07 +0000
Subject: Re: creating log files out of a delete statement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183133@lists.php.net to get a copy of this message
Andy B wrote:
i have a section of a website that deletes records from a mysql table... right now all the query is is a delete statement but i need to make a "log file" in this format: current time::username who executed delete:: deleted(name of record)::delete completed or delete failed depending on what happened... i can do all of the log except dont exactly know how to extract the "Name" field of the deleted record before it actually gets dumped.. that way i can use it on the log...
There's no way to extract it from the DELETE. You'll have to do a SELECT with the same parameters that you're going to do the DELETE with. Grab your data with the SELECT then execute the DELETE. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#183133) next »