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
12 calls to chado_pager_get_count()
- tripal_core_chado_hal_api in tripal_core/
includes/ tripal_core.ws_hal.inc - tripal_featuremap_featurepos.tpl.php in tripal_featuremap/
theme/ templates/ tripal_featuremap_featurepos.tpl.php - tripal_feature_featurepos.tpl.php in tripal_featuremap/
theme/ templates/ tripal_feature_featurepos.tpl.php - tripal_feature_genotypes.tpl.php in tripal_genetic/
theme/ templates/ tripal_feature_genotypes.tpl.php - tripal_feature_nd_genotypes.tpl.php in tripal_natural_diversity/
theme/ templates/ tripal_feature_nd_genotypes.tpl.php
File
- tripal_core/
api/ tripal_core.chado_query.api.inc, line 1667 - 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;
}
}