public function apply_mode_filter() { parent::apply_mode_filter(); if ($this->_filter_mode == ORM_Base::FILTER_FRONTEND) { $this->where($this->_object_name . '.public_date', '<=', date('Y-m-d H:i:00')); } }
public function apply_mode_filter() { parent::apply_mode_filter(); if ($this->_filter_mode == ORM_Base::FILTER_FRONTEND) { $date = date('Y-m-d H:i:00'); $this->where($this->_object_name . '.public_date', '<=', $date)->and_where_open()->where($this->_object_name . '.close_date', '>', $date)->or_where($this->_object_name . '.close_date', '=', '0000-00-00 00:00:00')->and_where_close(); } }