I need to add special operators to my query. Query:
SELECT "contests".*
FROM "contests" WHERE "status" = '-1'
AND "level1" = '1' AND "level2" = '1' AND "level3" = '1' AND "level10" = '1'
AND DATE(`contests`.`start`) >= '2012-03-17' AND DATE(`contests`.`stop`) <= '2013-12-20'
In Zend Framework 2:
$from = '2012-03-17';
$to = '2013-12-20';
$sql = new Sql($this->adapter);
$select = $sql->select('contests')
->where($where, $combination = new Predicate\Operator($from, Predicate\Operator::OPERATOR_GREATER_THAN_OR_EQUAL_TO, $to));
But this doesn't work.