Php-MySQL general function for insert, update,delete, count query

From: Date: Sat, 25 Jun 2005 14:47:37 +0000
Subject: Php-MySQL general function for insert, update,delete, count query
Groups: php.general 
Request: Send a blank email to php-general+get-217614@lists.php.net to get a copy of this message
Hi friends, I am using one perfect function for my queries for PHP+Oracle pages, this is below ========================== function sorgu($sql) { global $baglanti; $stmt=ociparse($baglanti,$sql); $sonuc=ociexecute($stmt,OCI_DEFAULT); $erra=OCIError(); $e=$erra['message']; $sorgutipi=ocistatementtype($stmt); $kayit_dizi=array(); $kayit_sayisi=-1; if($sonuc) { if($sorgutipi=="SELECT") { $kayit_sayisi = OCIFetchStatement($stmt,$kayit_dizi,0,-1,OCI_FETCHSTATEMENT_BY_ROW); } else { $kayit_sayisi = ocirowcount($stmt); } } return array($sonuc,$kayit_sayisi,$kayit_dizi); } ============================== I am using it for every kind of oracle db query. So my all queries under my control. Now I am looking for one function with PHP+MySQL Anybody know like short function as above php+oracle function? I am using some function sets they are using much database queries. I want to use min. query and connection. Thanks alot. Rasim rasimsen@gmail.com

« previous php.general (#217614) next »