Hi I have a mysql query which counts the rows in the table for pagination, but I also need to count and group by another column.
I can get the Query to group the records and show correct results, but it stops the pagination from working.
This is my Query
SELECT
COUNT(*) as num,
COUNT (search_term)
FROM $tableName
WHERE client_id = '{$client_id}'
AND search_term IS NOT NULL
AND search_term != ''
GROUP BY search_term
Any pointers would be appreciated