嗨,我有一个 mysql 查询,它计算表中的行以进行分页,但我还需要计算并按另一列分组。
我可以让查询对记录进行分组并显示正确的结果,但它会阻止分页工作。
这是我的查询
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
任何指针将不胜感激