I'm trying to set a variable for x.* and y.* like this:
("SELECT x.* as x_var, y.* as y_var
FROM table_x x
INNER JOIN table_y y on x.id = y.id WHERE x.id='1'");
But the code gives an error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as table_x, y.* as y_var FROM table_x x INNER JOIN table_y d ON x.id = y.id WH' at line 1
How can I fix it?