Hmm from your code below:

....FROM users WHERE 14 = '$0'"

What is "14" it isn't a field I would hope!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -----Original Message-----
> From: Steven M [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 9:28 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP/MySQL help?
> 
> 
> 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" <[EMAIL PROTECTED]> wrote in message 
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to