Using raw MYSQL queries in symfony
<p>I'm working with symfony but instead of using doctrine i use raw mysql queries.</p>

<pre><code>$query1 = "SELECT sport_id FROM coach WHERE id = $id";
$statement1 = $connection-&gt;query($query1);
$statement1-&gt;execute();
$sport_id = $statement1-&gt;fetch();
</code></pre>

<p>For the above query it gives an error as "Notice: Array to string conversion
500 Internal Server Error - ContextErrorException"</p>

<p>can someone please explain what is wrong with this? I'm beginner in symfony</p>