MySql Select where like, excluding?
I have a bunch of text fields and I need to search for #& but I want to not include #&39; as almost every row has that.
Is there a way to find #& blah blah; and not get every ' ?
I tried doing something like
SELECT * FROM `content_type_mobile_event` WHE开发者_如何学GoRE `field_movie_desc_value` RLIKE "^(&#)";
But that didn't work
Try:
SELECT *
FROM `content_type_mobile_event`
WHERE `field_movie_desc_value`
LIKE '&#%'
AND `field_movie_desc_value`
NOT LIKE ''%';
This will return the records whose value on the column field_movie_desc_value starts with &#, but does not start with '.
Did you simply try:
SELECT * FROM `content_type_mobile_event` WHERE `field_movie_desc_value` like "%#&" AND
WHERE `field_movie_desc_value` not like "#&39"
Can you just do a LIKE and a NOT LIKE?
SELECT * FROM `content_type_mobile_event`
WHERE `field_movie_desc_value` NOT LIKE '%#&39;%'
AND `field_movie_desc_value` LIKE '%#&'";
加载中,请稍侯......
精彩评论