static function gallery_gateway::count_images in Node Gallery 6
1 call to gallery_gateway::count_images()
- node_gallery_list in ./
node_gallery.pages.inc - @file Node gallery pages.
File
- ./
node_gallery.model.inc, line 121 - Node gallery module.
Class
Code
static function count_images($gids) {
$gids1 = is_numeric($gids) ? array(
$gids,
) : (array) $gids;
$result = db_query("SELECT COUNT(nid) AS count, gid FROM {ng_images} WHERE gid IN (" . db_placeholders($gids1) . ")\n GROUP BY gid", $gids1);
while ($r = db_fetch_array($result)) {
$items[$r['gid']] = empty($r['count']) ? 0 : $r['count'];
}
return is_numeric($gids) ? $items[$gids] : $items;
}