Re[2]: [PEAR-DEV] SQL_Wrapper Class

From: Date: Wed, 10 Jul 2002 08:04:02 +0000
Subject: Re[2]: [PEAR-DEV] SQL_Wrapper Class
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7619@lists.php.net to get a copy of this message
thank you all for your feedback, within minutes I got my feet wet in the PEAR community. cool. I think I have to make some further investigation to check, wheter my class is not just overhead. Beat Regards Louis MF> Le mer 10/07/2002 à 09:28, l.woods@swissart.net a écrit : >> Hello, >> >> I am new to this list and new to the PHP/PEAR community. I am writing >> an SQL wrapper class which will use the DB class from PEAR for the >> Database connection. The class will provide methods for the most >> common database interactions; i.e. $sqlObj->insert(array()); where the >> keys of the array are the fieldnames and the values of the array are >> rowvalues. MF> Yes in DB itself, in CVS. The doc is updated but not released. So I give MF> you an example : MF> $db = ... (DB object) MF> $array = array( MF> 'field1' => 'value1', MF> 'field2' => 'value2', MF> 'field3' => 'value3' MF> ); $db->>autoExecute('table', $array, DB_AUTOQUERY_INSERT); MF> // will make the following query : MF> // INSERT INTO table (field1, field2, field3) VALUES ('value1', MF> 'value2', 'value3') MF> // and will send it $db->>autoExecute('table', $array, DB_AUTOQUERY_UPDATE, 'id=5'); MF> // will make the following query : MF> // UPDATE table SET field1='value1', field2='value2', MF> field3='value3' MF> WHERE id=5 MF> // and will send it MF> It's a simple facility, not a real SQL wrapper and it's only in DB CVS MF> for the moment. If you have problems with autoExecute() or MF> autoPrepare(), ask me, I will send to you the complete doc. MF> Best Regards MF> Fabien -- Best regards, l mailto:l.woods@swissart.net

« previous php.pear.dev (#7619) next »