I'm working with symfony but instead of using doctrine i use raw mysql queries.
$query1 = "SELECT sport_id FROM coach WHERE id = $id";
$statement1 = $connection->query($query1);
$statement1->execute();
$sport_id = $statement1->fetch();
For the above query it gives an error as "Notice: Array to string conversion 500 Internal Server Error - ContextErrorException"
can someone please explain what is wrong with this? I'm beginner in symfony