gui fixes

This commit is contained in:
SJ
2015-07-02 14:35:45 +02:00
parent 863d9ecb50
commit 1b9e2e639d
5 changed files with 126 additions and 8 deletions

View File

@ -72,16 +72,16 @@ class ModelGroupGroup extends Model {
$where_cond = "";
$Q = array();
$search = preg_replace("/\s{1,}/", "", $search) . '%';
if($search) {
$search = preg_replace("/\s{1,}/", "", $search) . '%';
if($search){
$where_cond .= " WHERE `groupname` like '?'";
array_push($Q, $search);
}
$query = $this->db->query("SELECT COUNT(*) AS num FROM `" . TABLE_GROUP . "` $where_cond", $Q);
return $query->num_rows;
return $query->row['num'];
}