ie:
SELECT * FROM table WHERE blah JOIN test AS t2 ON (table.id = test.id) GROUP BY user ORDER BY id
into:
[
"SELECT" => "*",
"FROM" => ["table" => "table", "AS" => "table"],
"WHERE" => "blah",
"JOIN" => ["table" => "test", "AS" => "t2", "ON" => "(table.id = test.id)"],
"GROUP BY" => "user",
"ORDER BY" => ["field" => "id", "order" => "ASC"],
]
Is there a way to get how MYSQLI/PHP sees it, or would I have to make a parser myself which isn't guaranteed to parse it the same way