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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php