I am using Drupal 7 and i want to use the Pager into my query
This is my query and the way I can use
$query = db_select("SELECT entity_id , field_keywords_value , COUNT( DISTINCT ( entity_id )) total FROM field_data_field_keywords WHERE bundle = 'song' GROUP BY field_keywords_value");
$query = $query -> extend('PagerDefault');
$result = $query -> extend('PagerDefault') ->limit(2) ->execute();
but it give me the error, PDOException: erro
And if I can use it in the following way:
$query = db_query("SELECT entity_id , field_keywords_value , COUNT( DISTINCT ( entity_id )) total FROM field_data_field_keywords WHERE bundle = 'song' GROUP BY field_keywords_value");
$query = $query -> extend('PagerDefault');
$result = $query ->extend('PagerDefault') ->limit(2) ->execute(); echo ""; print_r($result); die('tert');
Then my page not working and give me the blank page.
Any help will be appreciate.
Thanks in advance.