RE: [PHP] PHP/MySQL help?

From: Date: Sun, 12 Jan 2003 23:34:31 +0000
Subject: RE: [PHP] PHP/MySQL help?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131368@lists.php.net to get a copy of this message
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: tim@hitcho.com.au > -----Original Message----- > From: Steven M [mailto:steven@tmarwick.fsnet.co.uk] > Sent: Monday, 13 January 2003 9:28 AM > To: php-general@lists.php.net > 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" <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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#131368) next »