* 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,
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.
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
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
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
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 :
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
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
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
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
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
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
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
13 matches
Mail list logo