Created
December 14, 2020 10:43
-
-
Save tranphuoctien/aed1540ec56b5f03369536514244575b to your computer and use it in GitHub Desktop.
Query JSON in mysql data array[]
This file contains hidden or 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
# Data in column alert | |
|alert | |
'[{"days": 2, "past": true, "time": 1607299200, "hours": 0, "weeks": 0, "minutes": 0, "seconds": 0}, "description": "Reminder"}]'; | |
SELECT * | |
FROM | |
WHERE alert->'$[*].trigger.time' <= JSON_ARRAY(1607731200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment