JSON in MySQL

Using json_decode in PHP is handing for extracting json parameters from PHP. Similarly, you can use JSON_EXTRACT in an SQL query.
 
SELECT JSON_EXTRACT(`params`, '$.parent_info_session') FROM `minto_categories` WHERE `id` = 96
 
Thise selects the data from the parent_info_session parameter from the JSON data that is stored in the params field of the minto_categories table.

You have no rights to post comments

Recent Random Insights