mysql select query within a serialized array
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm storing a list of items in a serialized array within a field in my database (I'm using PHP/MySQL). I want to have a query that will select all the records that contain a specific one of these items that is in the array. Something like this: select * from table WHERE ( an item in my array ) = '$n' Hopefully that makes sense. Any ideas would be greatly appreciated. Thanks 回答1: So you mean to use MySQL to search in a PHP array that has been serialized with the serialize command and stored in a database field? My first reaction