Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (40.7k points)

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?

1 Answer

0 votes
by (40.7k points)

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();

}   

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jan 5, 2021 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Dec 12, 2020 in SQL by Appu (6.1k points)

Browse Categories

...