a WHERE query already a WHERE needs to be used instead of the AND
Signed-off-by: Arun Persaud <arun@nubati.net>
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
$query_str.= "WHERE ". $additional_where_cond ." ";
if(isset($this->cfg->show_tags) && !empty($this->cfg->show_tags)) {
- $query_str.= "AND t.name IN ('".implode("','",$this->cfg->show_tags). "')";
+ if(isset($additional_where_cond))
+ $query_str.= "AND t.name IN ('".implode("','",$this->cfg->show_tags). "')";
+ else
+ $query_str.= "WHERE t.name IN ('".implode("','",$this->cfg->show_tags). "')";
}
if(isset($order_str))