Hi all
What I have below works good and returns all the reviews depending on the venue_id selected.
Code SQL:SELECT comments, DATE_FORMAT(review_date, '%M %D %Y') AS subdir, publisher, rating, FROM tbl_reviews WHERE venue_id='"...
Example return
comments: some comments about the venue
date: 12th dec 12
rating: 4
comments: some comments about the venue
date: 13th dec 12
rating: 2
and so on...
But now I need to COUNT the number of reviews for that particular venue_id.
Code SQL:SELECT comments, DATE_FORMAT(review_date, '%M %D %Y') AS subdir, publisher, rating, COUNT(venue_id) AS VenueReviewTotal FROM tbl_reviews WHERE venue_id='"...
Example return
comments: some comments about the venue
date: 12th dec 12
rating: 4
and stops, only shows one review even if there are 15
The review count is correct
VenueReviewTotal 15
What is happening, why does this happen when I introduce the COUNT function?
Thanks,
Barry![]()



Reply With Quote





Bookmarks