Du kan lägga till AND 's till din fråga genom att anropa where() flera gånger:
$select->where('this = ?', 'myValue')
->where('that = ?', 'myValue2');
Detta kommer att översättas till:
... WHERE this = 'myValue' AND that = 'myValue2'
För att lägga till en eller flera OR 's till din fråga, använd orWhere() :
$select->where('this = ?', 'myValue')
->orWhere('that = ?', 'myValue2');
Detta kommer att översättas till:
... WHERE this = 'myValue' OR that = 'myValue2'
Obs
Se till att använda ? platshållarsyntax eftersom det är ett enkelt sätt att förhindra SQL-injektioner.