скажем, что у меня есть:
$query = $this->select()
->where('name LIKE ?','%something%');
->where('section LIKE ?','%something%');
->where('cars LIKE ?','%something%');
............
............
Вы получаете очко!
Но я хочу добавить предложение where () в запрос, скажем, если .. $ x = 0; как то так:
$select = $this->select();
if($x == 0):
//add to the $this->select(); so it will be $this->select()->where('section LIKE ?','%something%');
$select->where('section LIKE ?','%something%');
endif;
if($x == 0):
/*add to the $this->select(); so it will be
$this->select()->where('section LIKE ?','%something%')
->where('cars LIKE ?','%something%');
*/
$select->where('cars LIKE ?','%something%');
endif;
Конечно, эта штука не работает, но я думаю, вы поняли, что я хочу сделать!
С наилучшими пожеланиями,