where() 공개 메소드

If you use an array in $column_name, a new clause will be added for each element. In this case, $value is ignored.
public where ( $column_name, $value = null )
예제 #1
0
 /**
  * @return ORM
  */
 protected function before_fetch(ORM $item)
 {
     if (is_null($this->_parent_key)) {
         throw new Extasy_Exception('Parent key not defined');
     }
     $item->where($this->_parent_key, '=', $this->param('parent'));
     return $item;
 }
예제 #2
0
파일: orm.php 프로젝트: greor/satin-spb
 public static function exclude_hidden(ORM $orm, $is_master_site)
 {
     if (!$is_master_site) {
         $hided_list = ORM::factory('hided_List')->where('object_name', '=', $orm->object_name())->find_all()->as_array(NULL, 'element_id');
         if (!empty($hided_list)) {
             $orm->where($orm->primary_key(), 'NOT IN', $hided_list);
         }
     }
 }
예제 #3
0
 public function before_fetch(ORM $item)
 {
     if (isset($_GET['cancel_filter'])) {
         $this->redirect('/' . Extasy_Url::url_to_route($this->get_index_route()));
     }
     $filter_form = new Form_Filter_Category($item);
     if (isset($_GET['filter'])) {
         $filter_form->submit();
     }
     $this->template->filter_form = $filter_form;
     $item->where('parent_id', 'IS', NULL);
     return parent::before_fetch($item);
 }
예제 #4
0
 /**
  * Read operation
  *
  * @param  int $id
  * @return ORM
  */
 public function read($id)
 {
     return $this->orm->where($this->orm->object_name() . '.' . $this->orm->primary_key(), '=', $id)->find();
 }
예제 #5
0
파일: Static.php 프로젝트: ariol/adminshop
 public function before_fetch(ORM $item)
 {
     $item->where('static', '=', true);
     return parent::before_fetch($item);
 }
예제 #6
0
파일: Menu.php 프로젝트: ariol/adminshop
 protected function before_fetch(ORM $item)
 {
     $item->where('parent_id', 'IS', NULL);
     return parent::before_fetch($item);
 }