Exemple #1
0
 function fetch_control_no_read()
 {
     $select = new database_select();
     $select->from($this->name, array('id', 'title', 'style'));
     $select->where(array('`is_read` = ?' => 0, '`menu` = ?' => 0));
     $select->order('date');
     $select->limit(50);
     return $this->adapter->fetch_all($select);
 }
Exemple #2
0
 function fetch_control_list($where = null, $order = null, $count = null, $offset = null)
 {
     $select = new database_select(null, $this->adapter);
     $select->from($this->name);
     if ($where) {
         $select->where($where);
     }
     if ($order) {
         $select->order($order);
     }
     if ($count) {
         $select->limit($count, $offset);
     }
     return $select;
 }