Requête en DQL.

Fermé
fred - Modifié par fred le 24/05/2011 à 13:01
Bonjour,

Je souhaiterais créer une requête DQL avec trois conditions. Voici celle que j'ai pour le moment:

  $vars_1['availabilitys'] = Doctrine_Query::create(Doctrine_Manager::connection()) 
  ->select('availability.position, availability.id_availability, availability.date, availability.time_beg, availability.time_end, availability.teachers_id_teacher, availability.students_id_student') 
  ->from('availability') 
  ->where("teachers_id_teacher = ?", $id_teacher) 
  ->execute(array(), Doctrine::HYDRATE_SCALAR);


Je dois y ajouter deux conditions et je ne sais pas du tout comment m'y prendre:
  ->where ("students_id_student = ?", $id_student) 
  ->where ("position = ?", $position)


Pouvez vous m'aider SVP ?
Merci