Use Pluf_SQL instead of raw SQL, the latter caused problems on installations with table prefixes.
This commit is contained in:
parent
603188f6ce
commit
b75884c57e
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user