function chado_pager_get_count

2.x chado_pager_get_count($element)

A function to retrieve the total number of records for a pager that was generated using the chado_pager_query() function


$element: The $element argument that was passed to the chado_pager_query function

Related topics


tripal_core/api/, line 1667
Provides an API for querying of chado including inserting, updating, deleting and selecting from chado.


function chado_pager_get_count($element) {
  $q = $_GET['q'];

  if (array_key_exists($q, $GLOBALS['chado_pager']) and 
    array_key_exists($element, $GLOBALS['chado_pager'][$q])) {
    return $GLOBALS['chado_pager'][$q][$element]['total_records'];
  else {
    return 0;