pager_query() - How to fetch only 100 records with a pagination 10 items per page? $result = pager_query($query, 10, 0, NULL, $args);


Currently with above code , I am getting all results with 10 items per page. But I need to display only first 100 records , with 10 items per page. Is this possible with pager_query()  or any alternate solution using plain PHP and MySQL?
You can pass a $count_query argument to pager_query(), which you can use to control the overall count:

e.g.

$sql = 'SELECT * FROM my_table';
$count_sql = 'SELECT COUNT(id) FROM my_table LIMIT 100';

$result = pager_query($sql, 10, 0, $count_sql);