PDA

View Full Version : Photo Count


photocroatia
12th of June 2004 (Sat), 09:34
Hi All,
What I am after is a count of all the photos that are in public exhibitions, not in the password protected ones.

Does anybody know what column or how to work out if the photo is in a public exhibition.

This works for all photos:
$query = "SELECT * FROM ee_photo";
$result = mysql_query($query);
$rows = mysql_num_rows($result);

Thank you.

photocroatia
18th of June 2004 (Fri), 23:21
FYI the answer to my question is:

$query = "SELECT ee_photo.ee_photo_id FROM ee_photo, ee_exhibition, ee_photo_to_exhibition WHERE ee_photo_to_exhibition.ee_photo_id = ee_photo.ee_photo_id AND ee_exhibition.ee_exhibition_pass = 'public' AND ee_photo.ee_photo_for_www = 'yes' AND ee_exhibition.ee_exhibition_id = ee_photo_to_exhibition.ee_exhibition_id";