[nycphp-talk] MySQL count( * ) syntax question
Daniel Convissor
danielc at analysisandsolutions.com
Mon Feb 9 19:27:53 EST 2004
Hey Folks:
I haven't been following the thread closely, so forgive me if this was
mentioned. Two options:
1) Run the query then check the row count via mysql_num_rows(). No rows
means no records.
2) Add a bogus column to the query:
select count(*), '' as x from user where user='y';
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list