forked from extern/egroupware
"fix for postgres problem reported by Hertell <nabble.com-at-hertell.com>, sql error when you filter by a category with sub-cats"
This commit is contained in:
parent
cdb39b2444
commit
1d7510f85e
@ -248,7 +248,7 @@ class socal
|
|||||||
}
|
}
|
||||||
array_walk($cats,create_function('&$val,$key','$val = (int) $val;'));
|
array_walk($cats,create_function('&$val,$key','$val = (int) $val;'));
|
||||||
|
|
||||||
$sql = '(cal_category'.(count($cats) > 1 ? ' IN ('.implode(',',$cats).')' : '='.$this->db->quote((int)$cat_id));
|
$sql = '(cal_category'.(count($cats) > 1 ? " IN ('".implode("','",$cats)."')" : '='.$this->db->quote((int)$cat_id));
|
||||||
foreach($cats as $cat)
|
foreach($cats as $cat)
|
||||||
{
|
{
|
||||||
$sql .= ' OR '.$this->db->concat("','",'cal_category',"','").' LIKE '.$this->db->quote('%,'.$cat.',%');
|
$sql .= ' OR '.$this->db->concat("','",'cal_category',"','").' LIKE '.$this->db->quote('%,'.$cat.',%');
|
||||||
|
Loading…
Reference in New Issue
Block a user