我有一张桌子,把工作时间储存在
JSON公司
格式。我正试图找到选择查询时打开的所有商店的方法。
这是存储时间的示例(存储在数据库中,未格式化):
{"friday-to": "18:00", "monday-to": "18:00", "sunday-to": null, "friday-to2": "06:00", "monday-to2": "06:00", "sunday-to2": null, "tuesday-to": "18:00", "friday-from": "07:00", "monday-from": "07:00", "saturday-to": "15:00", "sunday-from": null, "thursday-to": "18:00", "tuesday-to2": "06:00", "friday-from2": "06:00", "monday-from2": "06:00", "saturday-to2": "06:00", "sunday-from2": null, "thursday-to2": "06:00", "tuesday-from": "07:00", "wednesday-to": "18:00", "saturday-from": "09:00", "thursday-from": "07:00", "tuesday-from2": "06:00", "wednesday-to2": "06:00", "saturday-from2": "06:00", "thursday-from2": "06:00", "wednesday-from": "07:00", "wednesday-from2": "06:00"}
为获得更好的视图而格式化:
{
"friday-to": "18:00",
"monday-to": "18:00",
"sunday-to": null,
"friday-to2": "06:00",
"monday-to2": "06:00",
"sunday-to2": null,
"tuesday-to": "18:00",
"friday-from": "07:00",
"monday-from": "07:00",
"saturday-to": "15:00",
"sunday-from": null,
"thursday-to": "18:00",
"tuesday-to2": "06:00",
"friday-from2": "06:00",
"monday-from2": "06:00",
"saturday-to2": "06:00",
"sunday-from2": null,
"thursday-to2": "06:00",
"tuesday-from": "07:00",
"wednesday-to": "18:00",
"saturday-from": "09:00",
"thursday-from": "07:00",
"tuesday-from2": "06:00",
"wednesday-to2": "06:00",
"saturday-from2": "06:00",
"thursday-from2": "06:00",
"wednesday-from": "07:00",
"wednesday-from2": "06:00"
}
目前只有第一个
-至
是活动的,
-至2
仍然不相关。
当前MySQL版本:
mysql Ver 14.14 Distrib 5.7.22