Re: creating log files out of a delete statement

From: Date: Mon, 12 Apr 2004 00:40:22 +0000
Subject: Re: creating log files out of a delete statement
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183136@lists.php.net to get a copy of this message
got it will try that instead.. ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "Andy B" <aborka1@wmis.net> Cc: <php-general@lists.php.net> Sent: Sunday, April 11, 2004 8:23 PM Subject: Re: [PHP] creating log files out of a delete statement > 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 (#183136) next »