How do I do this?
For example, if my column is "cats, dogs, birds" and I want to get any rows where a column contains cats?
Raw query in Doctrine 2 is as follows:
public function getAuthoritativeSportsRecords(){ $sql = " SELECT name, event_type, sport_type, level FROM vnn_sport "; $em = $this->getDoctrine()->getManager(); $stmt = $em->getConnection()->prepare($sql); $stmt->execute(); return $stmt->fetchAll();}
public function getAuthoritativeSportsRecords()
{
$sql = "
SELECT name,
event_type,
sport_type,
level
FROM vnn_sport
";
$em = $this->getDoctrine()->getManager();
$stmt = $em->getConnection()->prepare($sql);
$stmt->execute();
return $stmt->fetchAll();
}