You are here

function ed_classified_get_adcount in Classified Ads 7.2

Same name and namespace in other branches
  1. 5.2 ed_classified_utils.inc \ed_classified_get_adcount()
  2. 5 ed_classified_utils.inc \ed_classified_get_adcount()
  3. 6.2 ed_classified_utils.inc \ed_classified_get_adcount()
1 call to ed_classified_get_adcount()
theme_ed_classified_ads_stats in ./ed_classified_themefuncs.inc

File

./ed_classified_utils.inc, line 179
Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights…

Code

function ed_classified_get_adcount($only_published) {
  $status = '';
  if ($only_published) {
    $status = 'status=1 AND';
  }
  $qr = db_query("SELECT COUNT(nid) as c FROM {node} WHERE " . $status . " type='ed_classified';");
  $o = db_fetch_object($qr);
  return $o->c;
}