I have following code (simplified to highlight error):
SELECT @x := @x + 1 FROM some_table, (SELECT @x := 0) y
It works in mysql, but when I use it in PHP, it breaks and returns all NULL values. I know it has to do with the portion "@x + 1" because if I replace this portion with something else, for example 'test', it will work.
What could be the issue?