function chado_pager_get_count
2.x tripal_core.chado_query.api.inc | chado_pager_get_count($element) |
3.x tripal_chado.query.api.inc | 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.
Parameters
$element: The $element argument that was passed to the chado_pager_query function.
Related topics
11 calls to chado_pager_get_count()
- tripal_featuremap_featurepos.tpl.php in legacy/
tripal_featuremap/ theme/ templates/ tripal_featuremap_featurepos.tpl.php - tripal_feature_featurepos.tpl.php in legacy/
tripal_featuremap/ theme/ templates/ tripal_feature_featurepos.tpl.php - tripal_feature_genotypes.tpl.php in legacy/
tripal_genetic/ theme/ templates/ tripal_feature_genotypes.tpl.php - tripal_feature_nd_genotypes.tpl.php in legacy/
tripal_natural_diversity/ theme/ templates/ tripal_feature_nd_genotypes.tpl.php - tripal_organism_stocks.tpl.php in legacy/
tripal_stock/ theme/ templates/ tripal_organism_stocks.tpl.php
File
- tripal_chado/
api/ tripal_chado.query.api.inc, line 1846 - Provides an API for querying of chado including inserting, updating, deleting and selecting from chado.
Code
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;
}
}