给个思路:
建一个保存所有可能出现的价格的表
查询用 find_in_set 连接
select * from  products, 价格表 where find_in_set(价格表.价格,  products.price) and 价格表.价格<=80

解决方案 »

  1.   

    select * from t where price>=80
      

  2.   

    应该建立多一个产品价格表 product_price
    id
    product_id
    price例如产品Ad的price是60,75,80
    那么在product_price中就有三条记录
    id product_id price
    1     1        60
    2     1        75
    3     1        80
    然后
    select * from product where id in(select product_id from product_price where price<=80);如果不改动数据表结构
    select * from product where concat(',',price,',') regexp '(,([1-7]{1}){0,1}[0-9]{1},)|,80,';
      

  3.   


    select * from product where concat(',',price,',') regexp '(,([1-7]{1}){0,1}[0-9]{1},)|,80,';这个本人测试过是可行的,楼主有测试过吗?
      

  4.   

    使用正则是可行的,但需要注意到条件并不是固定的
    那么正则规则串由谁来产生呢?
    总不能手工去修改吧?
    select * from product where concat(',',price,',') regexp '(,([1-7]{1}){0,1}[0-9]{1},)|,80,';这个本人测试过是可行的,楼主有测试过吗?
      

  5.   


    select * from product where concat(',',price,',') regexp '(,([1-7]{1}){0,1}[0-9]{1},)|,80,';这个本人测试过是可行的,楼主有测试过吗?是的,用正则不好。所以我先提出的方案是加一个表,不过看楼主应该是纠结在不改动数据表结构上。