List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:August 14 1999 1:40am
Subject:Re: select query ? using like and not like
View as plain text  
where directory regexp '[[:<:]]dir[[:>:]]'

that might work

(tim)


At 18:25, 19990813, Jerry Preeper wrote:
>I have a question regarding a select that I hope someone can help with.
>
>select * from users where directory like 'dir' and not like 'dir\/';
>
>In the column directory I have entries with
>
>dir/pictures
>dir dir/pictures
>dir dir/gifs dir/pictures
>
>I can get it to select the items with just dir/pictures, but I can't for
>the life of me figure out how to select the rows that include dir (ie row 2
>and row 3 but not row 1).  The query above gives me everything.  And I
>can't always count on dir being at the beginning of the query, nor can I
>assume it will be followed by something else with a space after it.  For
>example it could be like
>dir/pictures dir
>
>Anyone have any ideas?
>
>Jerry
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread10184@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail mysql-unsubscribe@stripped instead.
>
Thread
select query ? using like and not likeJerry Preeper14 Aug
  • Re: select query ? using like and not likeThimble Smith14 Aug
Re: select query ? using like and not likepreeper@cts.com14 Aug
  • Re: select query ? using like and not likeMartin Ramsch14 Aug
    • Re: select query ? using like and not likeJerry Preeper14 Aug