mysql> select e.name, count(p.event), e.date, e.events, count(c.id) from events e left join pictures p on p.event=e.events left join comments c on c.picture=p.id group by e.events order by e.date desc;
+---------------------------------+----------------+------------+--------+-------------+
| name | count(p.event) | date | events | count(c.id) |
+---------------------------------+----------------+------------+--------+-------------+
| Ayia Napa/Cypern 2001 (nano) | 192 | 2001-06-25 | 0007 | 115 |
| Midsommar 2001 | 135 | 2001-06-22 | 0006 | 5 |
| Baltops + diverse lumpen bilder | 0 | 2001-05-20 | 0005 | 0 |
| Kos 2000 | 63 | 2000-07-05 | 0004 | 4 |
| Studenten | 35 | 2000-06-09 | 0003 | 0 |
| Student Balen | 9 | 2000-05-21 | 0002 | 3 |
| Livigno 2000 | 86 | 2000-02-21 | 0001 | 2 |
+---------------------------------+----------------+------------+--------+-------------+
7 rows in set (0.02 sec)
mysql>
the problem is that i only have 124 images in event 0007, 133 in event 0006 etc etc...
the more comments the more pictures it seems.. in the events with almost no comments the picture ammount is correct. what should i do?
/nano
+---------------------------------+----------------+------------+--------+-------------+
| name | count(p.event) | date | events | count(c.id) |
+---------------------------------+----------------+------------+--------+-------------+
| Ayia Napa/Cypern 2001 (nano) | 192 | 2001-06-25 | 0007 | 115 |
| Midsommar 2001 | 135 | 2001-06-22 | 0006 | 5 |
| Baltops + diverse lumpen bilder | 0 | 2001-05-20 | 0005 | 0 |
| Kos 2000 | 63 | 2000-07-05 | 0004 | 4 |
| Studenten | 35 | 2000-06-09 | 0003 | 0 |
| Student Balen | 9 | 2000-05-21 | 0002 | 3 |
| Livigno 2000 | 86 | 2000-02-21 | 0001 | 2 |
+---------------------------------+----------------+------------+--------+-------------+
7 rows in set (0.02 sec)
mysql>
the problem is that i only have 124 images in event 0007, 133 in event 0006 etc etc...
the more comments the more pictures it seems.. in the events with almost no comments the picture ammount is correct. what should i do?
/nano