I have this SQL
SELECT
U.id,
U.first_name,
hobby.id,
hobby.name
FROM
USER AS U
INNER JOIN user_hobbies AS UH
ON
UH.user_id = U.id
INNER JOIN hobby ON hobby.id = user_hobbies.hobby_id FOR JSON AUTO
am trying to run in in xampp PHP myadmin and am getting an error
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 'JSON AUTO' at line 11
the FOR JSON AUTO is marked red even in SQL input could anyone help on how to so such inner join, return inner array