how to check function"s execution?
am 07.09.2009 23:52:56 von blueman
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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: how to check function"s execution?
am 07.09.2009 23:58:31 von Bpejman
Your dbupdate is probably executing a mysql_query command. Is so, update results from mysql_query will be either true on success or false on failure. If your query also fails due to perms it will return false.
------Original Message------
From: A.a.k
To: php-general@lists.php.net
ReplyTo: A.a.k
Subject: [PHP] how to check function's execution?
Sent: Sep 7, 2009 2:52 PM
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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: how to check function"s execution?
am 08.09.2009 15:44:13 von Bob McConnell
From: A.a.k
>=20
> hello
> I have a problem to check whether a function successfully inject to
database=20
> 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=20
> even possible or should I check within class or something?=20
I normally would have dbupdate() do something like:
$temp_set =3D pg_query($conn, $Sql);
$numRows =3D 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