You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example in the json_object section of the documentation (which is quite good I might add) doesn't work (at least not on MariaDB 10.3). StackOverflow has some similar posts for MySQL.
To make it work I had to use "AS" for each column. So, the example would have had to have been as follows if I were running it on my MariaDB 10.3 server (I used a different query for an existing table of my own and it worked perfectly):
select json_object(
customer_id AS 'customer_id'
, first_name AS 'first_name'
, last_name AS 'last_name'
, last_update AS 'last_update'
) as customer
from customer
where customer_id =1;
Thanks again for creating a great UDF!
The text was updated successfully, but these errors were encountered:
The example in the json_object section of the documentation (which is quite good I might add) doesn't work (at least not on MariaDB 10.3). StackOverflow has some similar posts for MySQL.
To make it work I had to use "AS" for each column. So, the example would have had to have been as follows if I were running it on my MariaDB 10.3 server (I used a different query for an existing table of my own and it worked perfectly):
select json_object(
customer_id AS 'customer_id'
, first_name AS 'first_name'
, last_name AS 'last_name'
, last_update AS 'last_update'
) as customer
from customer
where customer_id =1;
Thanks again for creating a great UDF!
The text was updated successfully, but these errors were encountered: