Bethlehem Function Venues
Categories
SELECT categories.*
FROM categories, listings, category_to_listing , regions, towns, subregions
WHERE listings.published=1
AND listings.trashed IS NULL
AND ( category_to_listing.listing_id = listings.id
AND category_to_listing.category_id = categories.id
AND categories.top_section_id=8
AND regions.id = subregions.region_id
AND regions.friendly='freestate'
AND towns.friendly='bethlehem'
AND subregions.id = towns.subregion_id
AND towns.id = listings.towns_id
)
GROUP BY categories.id
ORDER BY categories.id ASC
|