Re: Syntax ???

From: Date: Fri, 08 Feb 2002 18:42:56 +0000
Subject: Re: Syntax ???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84027@lists.php.net to get a copy of this message
just quote the 'y' in your query: $ynumber = mysql_query("SELECT COUNT(*) As Cnt FROM responses WHERE response='y'"); Edward ----- Original Message ----- From: "Ron Clark" <rclark@swbanktx.com> To: <php-general@lists.php.net> Sent: Friday, February 08, 2002 7:38 PM Subject: [PHP] Syntax ??? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello all again, > > Here is my line in my script: > $ynumber = mysql_query("SELECT COUNT(*) FROM responses WHERE > response=y"); > > But it returns a blank or empty. How do I convert this MySQL command > to PHP? > mysql> SELECT COUNT(*) FROM responses WHERE response="y"; > > In other words, how do I specify the "y" at the end without messing > up PHP? > > Thanks, > RC > > -----BEGIN PGP SIGNATURE----- > Version: PGP 7.1 > > iQA/AwUBPGQbIESpEYIqgLQzEQJr4wCeNiIhqHZYloLJWsvNr2ODustuPU0AoPw6 > ROvim3yCO9Z9GlyReg6pyMa9 > =D1uC > -----END PGP SIGNATURE----- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#84027) next »