This commit is contained in:
bettina 2001-03-01 01:29:31 +00:00
parent e10efb15b7
commit e387e95008

View File

@ -52,24 +52,26 @@
else { $ordermethod = " order by cat_parent asc"; } else { $ordermethod = " order by cat_parent asc"; }
if ($query) { if ($query) {
$phpgw->db->query("select * from phpgw_categories where cat_appname='" . $this->app_name . "' and " $this->db->query("select * from phpgw_categories where cat_appname='" . $this->app_name . "' and "
. "(cat_name like '%$query%' or cat_description like '%$query%') $filter $ordermethod" . " " . "(cat_name like '%$query%' or cat_description like '%$query%') $filter $ordermethod" . " "
. $this->db->limit($start,$limit),__LINE__,__FILE__); . $this->db->limit($start,$limit),__LINE__,__FILE__);
$this->total_records = $this->db->num_rows();
} }
else { else {
$phpgw->db->query("select * from phpgw_categories where cat_appname='" . $this->app_name . "'" $this->db->query("select * from phpgw_categories where cat_appname='" . $this->app_name . "'"
. "$filter $ordermethod" . " " . "$filter $ordermethod" . " "
. $this->db->limit($start,$limit),__LINE__,__FILE__); . $this->db->limit($start,$limit),__LINE__,__FILE__);
$this->total_records = $this->db->num_rows();
} }
$i = 0; $i = 0;
while ($phpgw->db->next_record()) { while ($this->db->next_record()) {
$cats[$i]['id'] = $phpgw->db->f('cat_id'); $cats[$i]['id'] = $this->db->f('cat_id');
$cats[$i]['owner'] = $phpgw->db->f('cat_owner'); $cats[$i]['owner'] = $this->db->f('cat_owner');
$cats[$i]['parent'] = $phpgw->db->f('cat_parent'); $cats[$i]['parent'] = $this->db->f('cat_parent');
$cats[$i]['name'] = $phpgw->db->f('cat_name'); $cats[$i]['name'] = $this->db->f('cat_name');
$cats[$i]['description'] = $phpgw->db->f('cat_description'); $cats[$i]['description'] = $this->db->f('cat_description');
$cats[$i]['data'] = $phpgw->db->f('cat_data'); $cats[$i]['data'] = $this->db->f('cat_data');
$i++; $i++;
} }
return $cats; return $cats;