我的表格有以下格式的条目
ID DATA
1 {"rows":[{"unit":"10","price":"20"},{"unit":"20","price":"30"},{"unit":"30","price":"40"},{"unit":"40","price":"50"}],"table":"\n<table>\n<thead>\n<tr>\n<th>Unit</th>\n<th>Price</th>\n</tr>\n</thead>\n\n<tbody>\n\n<tr><td>10</td><td>20</td></tr><tr><td>20</td><td>30</td></tr><tr><td>30</td><td>40</td></tr><tr><td>40</td><td>50</td></tr>\n\n</tbody>\n\n</table>\n"}
我希望条目unit = 30
。
我试过
SELECT * from content Where '30' IN "(".implode(',',`data`).");
但是会返回错误。请帮忙
答案 0 :(得分:0)
怎么样:
SELECT * FROM content WHERE data LIKE '%"unit":"30"%';