2017-08-07 95 views
0

我正在執行一個sql請求,但是在那個請求中我想從任務表中獲得所有字段......但是如果我在select中寫入m。* ... symfony告訴我任務實體沒有任何*字段。如何翻譯,沒有讓所有的現場......因爲我在該表中,從而或多或少40場...謝謝Symfony sql請求

$sql="SELECT v.id,v.codeVague, v.date_fin_ultime 
      FROM McInvestigatorBundle:Vague v 
        INNER JOIN McInvestigatorBundle:Enquete e WITH e.vague_id = v.id 
        INNER JOIN McInvestigatorBundle:Mission m WITH m.id = e.mission_id 
        INNER JOIN McInvestigatorBundle:Contrat c WITH c.id = m.contrat 
        INNER JOIN McInvestigatorBundle:User u WITH u.enqueteur_id = e.enqueteur_id 
        INNER JOIN McInvestigatorBundle:PointDeVente p WITH p.id = e.pdv_id 
      WHERE v.codeVague =".$wave_code." 
        AND e.type_id =".$type_id." 
        AND m.enqueteur_id=".$enq_id; 

回答

1

與試試看:

SELECT v.id,v.codeVague, v.date_fin_ultime, m 
     FROM McInvestigatorBundle:Vague v 
+0

你救了我,我並沒有想到這一切。它工作正常。 – Minirock