SELECT jid, tid, NAME, sales, province
, city, provider, jdaddress, qpaddress, area_flag
, price, LEVEL, open_time, contact, sort
, shelves, cover_pic, pics, create_date, push_hpage
, last_date
FROM m
WHERE shelves = 1
AND (INSTR(tid, ',1,') > 0 OR tid LIKE '1,%')
LIMIT 0,4;
, city, provider, jdaddress, qpaddress, area_flag
, price, LEVEL, open_time, contact, sort
, shelves, cover_pic, pics, create_date, push_hpage
, last_date
FROM m
WHERE shelves = 1
AND (INSTR(tid, ',1,') > 0 OR tid LIKE '1,%')
LIMIT 0,4;
SELECT FIND_IN_SET("261,",'1,');
学习了一招技巧,。mysql> SELECT FIND_IN_SET("261,",'1,');
+--------------------------+
| FIND_IN_SET("261,",'1,') |
+--------------------------+
| 0 |
+--------------------------+
1 row in set (0.00 sec)mysql>
find_in_set('2',tid)
-- 2是要查询的字符
-- tid 是要查询的列.谢谢楼上各位,可以用的。谢谢。