如何对多个格式为 JSON 的 ID 进行选择?
$query = 'SELECT * FROM articles as a WHERE "10" IN (a.catids)';
The value of a.catids in the db-field is {"0":"10","1":"12"};
最佳答案
类似于:
$query = 'SELECT * FROM articles as a WHERE a.catids like '%:"10",%';
我包括了 : 和 ,所以你确定你选择的是值而不是索引
关于php - 在格式为 json 的字段中选择多个 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10285493/