Attempting to get distinct count value back of the number “threads” in a query
SELECT COUNT( ft.thread_id ) AS num_items
FROM filter_thread ft
INNER JOIN filter f ON ft.filter_id = f.filter_id
WHERE f.tag LIKE '%foo%'
OR f.tag LIKE '%bar%'
The above works, but due to the way the tables are set up, counts duplicates. I’ve tried adding DISTINCT in many places. but had no luck.
For more information…this information is required to correctly list page numbers and associated posts for an AJAX comment section
Try this