Re: PHP and MySQL bug

From: Date: Mon, 06 Jan 2003 19:53:03 +0000
Subject: Re: PHP and MySQL bug
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-130483@lists.php.net to get a copy of this message
It would be helpful if you posted that error. You can get it by changing the die to $queryr = mysql_query($query) or die(mysql_error()); Without knowing the error, you problem will be harder for everyone to debug. -----Original Message----- From: Nuno Lopes [mailto:nunoplopes@clix.pt] Sent: Monday, January 06, 2003 10:09 AM To: MySQL List; php-general@lists.php.net Subject: Re: PHP and MySQL bug The problem is if I close the connection and reopen it the query is done, but if I remain with the same connection has the previous query, mysql returns an error. ----- Original Message ----- From: "Larry Brown" <larry.brown@dimensionnetworks.com> To: "MySQL List" <mysql@lists.mysql.com> Sent: Sunday, January 05, 2003 4:16 PM Subject: Re:PHP and MySQL bug > Try replacing the following line... > > @MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this query > doesn't > work!!!! > > With... > > $query = "UPDATE d SET h='$h' WERE id='$id'"; > $queryr = mysql_query($query) or die("The sql statement does not execute"); > > if(mysql_affected_rows() !== 1) > { > die("The sql statement is successfully run however either h did not > change or there is an internal error. Try executing the sql from the > command line to make sure it otherwise works."); > } > > and see which is coming back. > > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <mysql-thread129151@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-goodie=apolloi.com@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

« previous php.general (#130483) next »