This doesn't work either. SELECT count(freerooms.room), WEEK(MAX(booking.date),1), WEEK(MIN(booking.date),1) as total FROM freerooms LEFT JOIN booking USING(room);
> > All good so far > > now if I run this > > > > SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) > FROM freero > > oms f, booking b; > > ->+---------------+---------------------+---------------------+ > > | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) | > > +---------------+---------------------+---------------------+ > > | 24817 | 48 | 40 | > > +---------------+---------------------+---------------------+ > > What I have found is freerooms.room has 83 rows and booking has 299. The value returned for count(f.room) is these two figures multiplied.??? Why would it do this? And how can I get it to return the real value only Regards M: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]