$query->select('CONCAT(Promotion.endDate," ",Promotion.endTime) date'); $query->from(__CLASS__); #$query->where('Promotion.endDate <= NOW() AND Promotion.endTime <= NOW()'); $query->where('date <= NOW()'); $query->orderBy('Promotion.endDate DESC, Promotion.name DESC, Promotion.promoId DESC'); return $query->execute(); returns: [Doctrine_Connection_Mysql_Exception] SQLSTATE[42000]: Syntax error or access violation: 1065 Query was empty