Use Pluf_SQL instead of raw SQL, the latter caused problems on installations with table prefixes.

This commit is contained in:
Thomas Keller 2011-03-16 20:58:13 +01:00
parent 603188f6ce
commit b75884c57e

View File

@ -377,10 +377,9 @@ class IDF_Views
$forgestats['projects'] = count($projects); $forgestats['projects'] = count($projects);
// Count members // Count members
$db =& Pluf::db(); $sql = new Pluf_SQL('first_name != %s', array('---'));
$sql = "SELECT count(id) as nb FROM indefero_users WHERE first_name != '---'"; $forgestats['members'] = Pluf::factory('Pluf_User')
$ret = $db->select ($sql); ->getCount(array('filter' => $sql->gen()));
$forgestats['members'] = $ret[0]['nb'];
return $forgestats; return $forgestats;
} }