mysql5.7 json数据类型存储 导致数据顺序发生变化
天蓬老师
天蓬老师 2017-04-17 16:15:38
0
1
875

json字符串数据原先是使用text进行存储的,字典格式会保持原有的顺序。

但是该为json后,变失去了顺序性。

如何在json格式里保持?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
Ty80

json is naturally unordered, just like js. For reference
If you want to maintain the order when outputting, add a key-value pair to json"sort":"a,b,c", and loop according to the order of the sort value when outputting

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!