<select name="year" id="f_year"> <option value=""><?php _e('From', 'cars_attributes'); ?></option> <?php foreach($year as $y) { ?> <?php } ?> </select> <select name="year" id="t_year"> <option value=""><?php _e('To', 'cars_attributes'); ?></option> <?php foreach($year as $y) { ?> <?php } ?> </select>
funkcja
$years = Params::getParam('year') ; $year = ModelCars::newInstance()->getCarAttr(); public function getCarAttr() { $this->dao->select(); $this->dao->from( $this->getTable_CarAttr()); //$this->dao->where('fk_i_item_id', $itemId); $this->dao->groupBy('i_year', 'ASC') ; $result = $this->dao->get(); if( !$result ) { } return $result->result(); }
Teraz jak znaleść przedmioty pomiędzy tymi watościami?
i_year to jest rocznik samochodu. Na tą chwilę jak zazncze 2001-2003 i i klikne szukaj
przełącza mi na 2003-2003 i wyswietla brak przedmiotów odpowiadających kryteriom.
Odświeżam