RE: how to check function's execution?

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

 



From: A.a.k
> 
> hello
> I have a problem to check whether a function successfully inject to
database 
> or not, here is the code :
>    if($object->dbupdate())
>        echo 'done';
>      else
>         echo 'damn!';
> inside the 'if' statement $obj->dbupdate() doesn't execute , how can I

> execute and check if it was a successful inject within this function?
is it 
> even possible or should I check within class or something? 

I normally would have dbupdate() do something like:

    $temp_set = pg_query($conn, $Sql);
    $numRows = pg_affected_rows($temp_set);
    return $numRows;

There should be something similar available in the other database APIs.

Bob McConnell

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