Created
February 20, 2021 15:14
-
-
Save Volmarg/81b193c1cda8cda5aef6536f684168d4 to your computer and use it in GitHub Desktop.
Selecting data from database as json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT( | |
'[', | |
GROUP_CONCAT(JSON_OBJECT( | |
'id', id, | |
'name', name, | |
'color', color, | |
'background_color', background_color, | |
'drag_background_color', drag_background_color, | |
'border_color', border_color, | |
'deleted', deleted | |
)), | |
']' | |
) | |
FROM my_schedule_calendar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment