0 votes
1 view
in SQL by (40.4k 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.4k 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 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Dec 12, 2020 in SQL by Appu (6.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...