Lighter query to get the number of events displaid on every single page of
[platal.git] / plugins / insert.getNbIns.php
index cec99e2..8cf3b2e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
 
 /*
  * Smarty plugin
- * ------------------------------------------------------------- 
+ * -------------------------------------------------------------
  * File:     insert.getNbIns.php
  * Type:     insert
  * Name:     getNbIns
- * Purpose:  
+ * Purpose:
  * -------------------------------------------------------------
  */
 function smarty_insert_getNbIns($params, &$smarty)
 {
-    $res = XDB::query("SELECT COUNT(*) FROM auth_user_md5 WHERE perms IN ('admin','user') AND deces=0");
+    $res = XDB::query("SELECT COUNT(1) FROM auth_user_md5 WHERE perms IN ('admin','user') AND deces=0");
     $cnt = $res->fetchOneCell();
     return number_format($cnt, 0, ",", ".");
 }
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>