如何搜索全文,然后根据模型标签获取项目
基本上我有这个模型项目。
| id | name | tags |
|----|--------|------------------|
| 1 | test 1 | ipsum,amet,dolor |
| 2 | test 2 | myname,as |
| 3 | test 3 | jendoe,gmail |
然后我根据这段文字查询
$term = 'My test jendoe go lorem';
SELECT * FROM items WHERE tags LIKE '%'. $term .'%' LIMIT 0,1;
然后我将得到项目3。这可能吗?