Код: Выделить всё
select qty, type
from tItem
where qty=0
and (type=1 or price=100)
< /code>
Как мне это сделать, используя активную запись в codeigniter? < /p>
Потому что, если я сделаю < /p>
$this->db->where('qty','0');
$this->db->where('type','1');
$this->db->or_where('price','100');
< /code>
Запрос был бы как < /p>
select qty, type from tItem where qty=0 and type=1 or price=100
Подробнее здесь: https://stackoverflow.com/questions/199 ... conditions