Content字段内容" 分享图片ìhttp://localhost:9999/Upload/Images/ask/2011/7/29/129564041350000000.jpgì哦也 "
我想去掉 ìhttp://localhost:9999/Upload/Images/ask/2011/7/29/129564041350000000.jpgì LIKE的时候 只查前后的就可以了
正则  ì.*ì 这个就可以只查到"ìhttp://localhost:9999/Upload/Images/ask/2011/7/29/129564041350000000.jpgì"
但是我想匹配的 东西 是
select * from 表  where 分享图片哦也 like "参数"
select * from 表  where Content like ...?
?处怎么写.

解决方案 »

  1.   

    select * from 表 where Content REGEXP '^分享图片.*哦也$';
      

  2.   

    楼上的已经能查了 但是这样写 我参数怎么穿啊 
    比如文本框里 写个"哦"
    那 '^分享图片.*哦也$';参数怎么写
    如果写成 '^哦.*哦$' 那么就查不出来了.
      select * from 表 where Content REGEXP '^分享图片.*哦也$';
      

  3.   

    我是想 写成模糊查询 但是
    ìhttp://localhost:9999/Upload/Images/ask/2011/7/29/129564041350000000.jpgì
    这些字符串 不参与参数匹配.