public function setRecords($notices_list) { global $dbh; $this->notices_list = array(); if (!count($notices_list)) { return array(); } $req = "SELECT notice_id FROM notices\tWHERE notice_is_new=1 and notice_id in (" . implode(",", $notices_list) . ") ORDER by notice_date_is_new"; $res = pmb_mysql_query($req, $dbh); if (pmb_mysql_num_rows($res)) { while ($r = pmb_mysql_fetch_object($res)) { $this->notices_list[] = $r->notice_id; } } if (!count($this->notices_list)) { return array(); } $filter = new filter_results($this->notices_list); $this->notices_list = $filter->get_array_results(); return $this->notices_list; }