[thelist] php/MySql Help Please

Michael Pemberton mpember at phreaker.net
Tue Oct 2 21:17:04 CDT 2001


How are you attempting to check for errors?

MySQL / PHP has a method called mysl_error().  This is where you will find
any errors that were returned.

Here's some code I use myself to to a quick (and dirty) test.

$result=mysql_db_query($dbase, $query);
if (mysql_error()) {
    $error = mysql_error();
    echo "Error : \"$error\"<br>\n";
    exit();
};

Hope this helps.

Ron Dorman wrote:

> We have php-4.0.4pl1-9 installed via rpm, mysql-3.23.36-1 installed via
> rpm on RedHat 7.1.  Coding forms with php, db connect works fine.
> However, bad sql statements in the php code do not get mysql errors
> back.  Debugging the code is painfull this way.  Can anyone shed some
> light on what configs I should look at to correct this and get "full"
> communications between the two.
>
> Thanks,
> Ron D.
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !

--
Michael Pemberton
mpember at phreaker.net
ICQ: 12107010








More information about the thelist mailing list