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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux