Taka sprawa.
Silnik.
/**
* Get Car attributes given a item id
*
* @param int $itemId
* @return array
*/
public function getCarAttr($itemId)
{
$this->dao->select();
$this->dao->from( $this->getTable_CarAttr());
$this->dao->where('fk_i_item_id', $itemId);
$result = $this->dao->get();
if( !$result ) {
}
return $result->row();
}
Formularz
<div class="row one_input"> <h6><?php _e('Year', 'cars_attributes'); ?></h6> <select name="year-min" id="year-min"> <option value=""><?php _e('From', 'cars_attributes'); ?></option> <?php foreach($years as $y) { ?>
<option value="<?php echo $y['fk_i_item_id']; ?>"
<?php if($year==$y['fk_i_item_id']) { echo 'selected'; } ?>>
<?php echo $y['i_year']; ?></option> <?php } ?>
<select name="year-max" id="year-max"> <option value=""><?php _e('To', 'cars_attributes'); ?></option> <?php foreach($years as $y) { ?>
<option value="<?php echo $y['fk_i_item_id']; ?>"
<?php if($year==$y['fk_i_item_id']) { echo 'selected'; } ?>>
<?php echo $y['i_year']; ?></option> <?php } ?>
i Teraz tak jak sie domyslacie rocznik mam w tabeli CarAttr z id = fk_i_item_id i tabelka i_year
wszystko generalnie nie gra mianowicie zamiast pobierać roczniki wyswietla mi w select "from" i " to" gdzie robie blad??
Rozwiązane
Podsuniecie pomysł jak wcisnąć tu funkje Between?