posted 17 years ago
This may not be most best solution but it's easy. Since you are using a 1 for featured photo (and i am assuming a 0 for all non-featured) just use an Order By DESC clause to order the photos, the first will be your featured photo, then you can just count the records in the result set by iterating through it.
[ April 21, 2006: Message edited by: Brian Smith ]