Re: DB::storage delete method

From: Date: Wed, 23 May 2001 12:20:16 +0000
Subject: Re: DB::storage delete method
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-156@lists.php.net to get a copy of this message
["Wolfram Kriesing" <lists@kriesing.de>] > since i am using the storage class quite extensive > i also had to add the method delete, > here is the basic implementation, this is just the very first version, i > know there is quite some to do, but for now it works without special > features > > ---------------------------------------------- > function delete() > { > $query = 'DELETE FROM ' . $this->_table .' WHERE '. > $this->_makeWhere(); > $stmt = $this->_dbh->prepare($query); > $res = $this->_dbh->execute($stmt, &$params); > if (DB::isError($res)) > { > return $res; > } > return DB_OK; > } // end of function > ---------------------------------------------- If you build your query like that you don't need to do prepare/execute, a plain query() or simpleQuery() will do. I'll add it to the CVS version shortly. - Stig -- Stig Sæther Bakken <ssb@fast.no> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.pear.general (#156) next »