Use Doctrine instead of mysql_query.