php - Execute custom SQL in symfony -


I am trying to execute some custom SQLs to retrieve some custom objects in the Simphoni application. I found a tutorial on the web, who said that something like this will allow me to execute the query, although the model can not be populated (the model is not a major issue, it is only for reading).

  $ pdo = Doctrine_Manager :: getInstance () - & gt; Connection () - & gt; GetDbh (); $ Pdo- & gt; Prepare ("SELECT *" from some complex); $ Pdo- & gt; Executed (); $ This- & gt; Sensorading = $ pdo- & gt; Fatch ALL ();   

but I am getting an error:

  Fatal error: call the undefined method PDO :: execute () sfproject / apps / frontend / modules /site/actions/actions.class.php    

  $ query = "Select from some complex"; $ RS = Doctrine_Agre :: Match () - & gt; GetCurrentConnection () - & gt; Get Ashok ($ query);   

The result is an array.

Comments