Date: 03/13/01
- Next message: Mike Green: "Re: [phplib] Some pages not completely loading"
- Previous message: John Lewis: "[phplib] test for database SQL success or failure"
- In reply to: John Lewis: "[phplib] test for database SQL success or failure"
- Next in thread: Tiong Kee Yong: "RE: [phplib] test for database SQL success or failure"
- Reply: Tiong Kee Yong: "RE: [phplib] test for database SQL success or failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> I'm looking for a way to test whether or not a call to phplib query
> function has succeeded or failed.
>
> if i call the 'query' function ie. $db->query( "SQL" );
>
> what can I do next to test the "pass" or "fail" of the SQL statement.
>
$res = $db->query("SELECT * FROM mytable");
if ($res== 0) {
echo "FAILED.<BR>\n";
} else {
echo "SUCCESS resource id =" . $res ."<BR>\n";
}
--------------------------------------
William Emmanuel S. Yu
Ateneo Cervini-Eliazo Networks (ACENT)
email : william.s.yu <email protected>
web : http://cersa.admu.edu.ph/
phone : 63(2)4266001-5925/5904
... and furthermore ... I don't like your trousers.
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Mike Green: "Re: [phplib] Some pages not completely loading"
- Previous message: John Lewis: "[phplib] test for database SQL success or failure"
- In reply to: John Lewis: "[phplib] test for database SQL success or failure"
- Next in thread: Tiong Kee Yong: "RE: [phplib] test for database SQL success or failure"
- Reply: Tiong Kee Yong: "RE: [phplib] test for database SQL success or failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

