How do i search from serialize field in mysql database?

后端 未结 1 1040
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 15:22

How do i search from serialize field in mysql database except mysql like statement?

The data is:

a:9:{s:2:\"m1\";s:4:\"1217\";s:2:\"m2\";s:8:\"9986-9         


        
相关标签:
1条回答
  • 2020-12-03 15:49

    Have you tried the following:

    SELECT * FROM table WHERE field like '%"m9";s:18:"Ok Then, Yes It Is";%'
    

    ?

    But in fact if you want to search in such data, you should simple create proper structure of your table and not to put all serialized data in one column

    0 讨论(0)
提交回复
热议问题