Drupal pager disappears when I add GROUP BY
to the query.
This code works.
$countSql = "SELECT COUNT(*) FROM journal ";
$sql = "SELECT * FROM journal";
$result = pager_query($sql, 1, 0, null, $countSql);
theme_pager(NULL, 10)
This code doesn't show the pager.
$countSql = "SELECT COUNT(*) FROM journal ";
$sql = "SELECT * FROM journal GROUP BY id";
$result = pager_query($sql, 1, 0, null, $countSql);
theme_pager(NULL, 10)
What is it wrong with the latter code?