RE: [phplib] test for database SQL success or failure From: Tiong Kee Yong (keeyong <email protected>)
Date: 03/13/01

Alternatively, you can also use the $db->Errno and $db->Error() combo to get
you more control on the displayable error.

To trap this, you will need to set the $db->Halt_On_Error = "no".

Sample code below:

        $db->Halt_On_Error = "no";
        $db->query($sql);
        if ($db->Errno == 0)
                echo "Success...";
        else
                echo "Error No: " . $db->Errno . "<br>" . $db->Error();

HTH.

Kee Yong
Email: keeyong <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>