Re: [PHP] mysql_error() problem?

2003-08-14 Thread Curt Zirzow
* Thus wrote Tyler Longren ([EMAIL PROTECTED]): hmmm...perhaps that was it. When I had this issue before, someone told me to check mysql_affected_rows() when using issuing an UPDATE query. I'll give that a shot. Correct, mysql_affected_rows() on a query that doesn't return rows (insert,

Re: [PHP] mysql_error() problem?

2003-08-14 Thread CPT John W. Holmes
From: Tyler Longren [EMAIL PROTECTED] I'm running an UPDATE query on my table. After executing the query, I check mysql_error() to see if there's any errors: if (mysql_error() == ) { // success } else { // failure } mysql_error() is always empty even if the query didn't succeed.

Re: [PHP] mysql_error() problem?

2003-08-14 Thread Tyler Longren
PROTECTED] Sent: Wednesday, August 06, 2003 3:35 PM Subject: Re: [PHP] mysql_error() problem? From: Tyler Longren [EMAIL PROTECTED] I'm running an UPDATE query on my table. After executing the query, I check mysql_error() to see if there's any errors: if (mysql_error

[PHP] mysql_error() problem?

2003-08-07 Thread Tyler Longren
Hi, I'm running an UPDATE query on my table. After executing the query, I check mysql_error() to see if there's any errors: if (mysql_error() == ) { // success } else { // failure } mysql_error() is always empty even if the query didn't succeed. So it always thinks it succeeds. I

[PHP] mysql_error problem

2003-06-23 Thread Ben Edwards
I am using the below function (error_db) witch is called thus:- function query_db( $sql, $db ) { $result = mysql_query( $sql, $db ) or error_db( $sql, $db ); return $result; } But $sqlerr is always blank (it is set with '$sqlerr = mysql_error( $db );'). Any idea why? Ben

[PHP] MySql_Error();

2002-07-04 Thread Skyhawk
Please, How do I make to get all errors of MySql ? I'm making a function for translate all errors. Example: function TranslateErrors($err) { global $result; global $text; Switch ($err) { case 1045 : $text = User or Password invalid; Break; case 2005 :

Re: [PHP] MySql_Error();

2002-07-04 Thread Analysis Solutions
On Thu, Jul 04, 2002 at 08:48:26AM -0300, Skyhawk wrote: Please, How do I make to get all errors of MySql ? I'm making a function for translate all errors. Example: Uh, why? PHP's mysql_error() does the job for you. http://www.php.net/manual/en/function.mysql-error.php If you're hell bent

[PHP] mysql_error()

2002-03-05 Thread GENESiS DESiGNS
Dan, When I put 'mysql_error()' inside the 'or die();' it shows nothing when it doesn't connect? Thanks, -GENESiS DESiGNS -Sean Kennedy -http://www.gdesigns.vcn.com

Re: [PHP] mysql_error()

2002-03-05 Thread GENESiS DESiGNS
Dan, No, I telnet to gdesigns.vcn.com. Thanks, -GENESiS DESiGNS -Sean Kennedy -http://www.gdesigns.vcn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_error() not really helping

2001-02-14 Thread Christian Dechery
Christian - You need to be checking the return values of the mysql_*() functions. Make sure you're not calling them with a @mysql_*() as that will disable error reporting. Perhaps you should give us some examples of what's failing and how? Also, if the server isn't yours the server admin may

[PHP] mysql_error() not really helping

2001-02-13 Thread Christian Dechery
I'm having a little trouble here developing and running queries. I spent some time developing in ASP, and whenever there was something wrong with a query, the script halted, and the error message - from ODBC, tye sql syntax error - was printed along with the line of code. In PHP that's not

Re: [PHP] mysql_error() not really helping

2001-02-13 Thread scottrus
Christian - You need to be checking the return values of the mysql_*() functions. Make sure you're not calling them with a @mysql_*() as that will disable error reporting. Perhaps you should give us some examples of what's failing and how? Also, if the server isn't yours the server admin may

Re: [PHP] mysql_error() not really helping

2001-02-13 Thread David Robley
On Wed, 14 Feb 2001 13:01, Christian Dechery wrote: I'm having a little trouble here developing and running queries. I spent some time developing in ASP, and whenever there was something wrong with a query, the script halted, and the error message - from ODBC, tye sql syntax error - was