菜单

mysql查询数据字段的serialize数组中指定的值

一个数组通过 serialize后存入了mysql中,值是这样的格式: a:2:{i:0;s:9:"baidu";i:1;s:10:"google";} 使用sql语句查找的方法: 用like select * from table_name where domain like '%baidu%'; 或者使用regexp select * from table_name where domain regexp 'baidu';