[thelist] MySQL multiple counts problem

Ken Schaefer Ken at adOpenStatic.com
Fri Feb 13 00:36:34 CST 2009


Use UNION

Cheers
Ken

-----Original Message-----
From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Cristian Rosescu
Sent: Friday, 13 February 2009 5:14 PM
To: thelist at lists.evolt.org
Subject: [thelist] MySQL multiple counts problem

Hi,

I have a MySql database that contains a 'motels' table. One of the fields in
the table is 'breakfast_available' and this contains an integer (1 for yes,
0 for no). The other field in this table is 'conference_facilities' which
also stores an integer value 1 or 0

I would like to setup one MySql query that will display this number of
motels have breakfast available (breakfast_available = 1) and this number of
motels provide conference facilities (conference_facilities = 1)

Thank you for your help in advance
 



More information about the thelist mailing list