0

Is it possible to do something like this in Doctrine?

SET @somevariable=null;

I am currently doing the following:

$query = <<<SQL
    SELECT * FROM table;
SQL;

$iterator = new DoctrineDBALConnectionSourceIterator($em, $query);

And this works. However, when I try the following, it understandably fails.

$query = <<<SQL
    SET @somevariable=null;

    SELECT * FROM table;
SQL;

$iterator = new DoctrineDBALConnectionSourceIterator($em, $query);

How would I make it work using doctrine?

Bird87 ZA
  • 2,313
  • 8
  • 36
  • 69

0 Answers0