Re: PHP/MySQL help?
| From: | Steven M | Date: | Sun, 12 Jan 2003 23:28:20 +0000 |
| Subject: | Re: PHP/MySQL help? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131366@lists.php.net to get a copy of this message | ||
Hi Johannes
Thanks for the help. I have taken out the mysql_close() and it looks like
it is submitting ok (ie no error messages) but it is not updating the
database when i check it. Any ideas?
Thanks.
Steven
"Johannes Schlueter" <php@schlueters.de> wrote in message
news:200301122334.12302.php@schlueters.de...
Hi Steven,
On Sunday 12 January 2003 23:58, Steven M wrote:
> include 'db.php';
>
> $result = mysql_query("SELECT newtest FROM users WHERE 14 = '$0'");
> list($number) = mysql_fetch_row($result);
Here you are closing your conenction to the MySQL-Server:
> mysql_close();
> if($number==0)
But here you need it again:
> {mysql_query("UPDATE users SET points = '$+2' WHERE 14 = '$0'");
> mysql_query("UPDATE users SET newtest = '$1' WHERE newtest =
> '$0'");
So remove the mysql_close() if it don't work: Post the error message!
johannes