Why does the code below does not work
$db = new PDO(...); //init the PDO
$query = $db->query("
Set @ids := 0;
SELECT username, @ids := @ids + 1 as id FROM user
");
$query->execute();
If I didn't use mysql row number function it work find. So does it mean I cannot use mysql row number function with php?