Hey Dody, nice meeting you 
the code in context
Code:
// filter unhide
$i=0;
while($i<count($c)) {
$query .= " and category_id != $c[$i]";
$i++;
}
// filter member only
if(!$users_obj->GetUserAuthentication()==0) {
$i=0;
while($i<count($c2)) {
$query .= " and category_id != $c2[$i]";
$i++;
}
}
// filter by date
$query .= " WHERE '01-01' > $d_open AND '01-02' < $d_closed " ;
I hard coded the date while i was testing it... is the position correct? its where all all the other ammendments to the query happened so i shoved it in