Use mysql SET variables in db_query

How can i use mysql SET variables while using my PDO queries?

db_query(‘SET @x := 5,SET @y := 6, SELECT * from mytable’)->fetchAll();

I have tried this and many variations of this statement with and without ‘:’ etc, but it doesn’t work.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed