Re: PHP/MySQL help?
| From: | Johannes Schlueter | Date: | Sun, 12 Jan 2003 22:34:12 +0000 |
| Subject: | Re: PHP/MySQL help? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131362@lists.php.net to get a copy of this message | ||
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