Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Micah Stevens
SELECT COUNT(WMS_Area.Area_ID) AS complete_areas FROM WMS_Area, WMS_Bookings WHERE WMS_Area.Area_ID = WMS_Bookings.Area_ID AND MIN(WMS_Bookings.Booking_Status) = 2 GROUP BY WMS_Area.Area_ID Or something like that.. there's probably a better way to do it.. On Fri January 23 2004 1:05 pm, Shau

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Shaun
Thanks for your reply, but that only tells me how many complete Bookings there are. I need to know how many Areas are complete i.e. for each Area where Bookings take place, all of those Bookings have been completed. Any ideas? "Oòvn?Oòsis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PRO

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Martín Marqués
Mensaje citado por Shaun <[EMAIL PROTECTED]>: > Hi, > > I have a Bookings application. When a Booking is made it is entered in to > the Bookings table. Bookings take place at Areas, held in the Areas table. > Each Area has a unique Area_ID held in the Bookings table for each Booking. > Each Booki

[PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Shaun
Hi, I have a Bookings application. When a Booking is made it is entered in to the Bookings table. Bookings take place at Areas, held in the Areas table. Each Area has a unique Area_ID held in the Bookings table for each Booking. Each Booking needs to be completed and when done so the Booking_Statu