List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 29 2002 8:18pm
Subject:Re: Please Help with Pattern Matching
View as plain text  
At 14:59 -0500 1/29/02, Douglas Brantz wrote:
>I have a big problem with pattern matching;
>Why does the first example work like this I need to find everything with
>MWF in it and I only get the 1 entry?  Is there a way I can make this
>work.

It's unclear what you're expecting to happen.  From the output of the
second query, it looks like only one entry actually has MWF in it.
If that's so, why would you expect the first query to return more than
one row?

Do you mean you want entries that have M *or* W *or* F?

>
>mysql> select schdays from courses where schdays LIKE "%MWF%";
>+---------+
>| schdays |
>+---------+
>| MWF     |
>+---------+
>1 row in set (0.00 sec)
>
>mysql> select schdays from courses where schdays LIKE "%M%";
>+---------+
>| schdays |
>+---------+
>| MWF     |
>| MW      |
>| MW      |
>| M       |
>| M       |
>+---------+
>5 rows in set (0.00 sec)
>
>Thanks in advance,
>Douglas
>
>--
>Douglas R. Brantz
>Computer Consultant
>Fine & Applied Arts
>Appalachian State University
>Boone, NC 28608
>
>828-262-6549 (office)
>828-262-6312 (fax)
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread97888@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Thread
Please Help with Pattern MatchingDouglas Brantz29 Jan
  • Re: Please Help with Pattern MatchingPaul DuBois29 Jan
  • RE: Please Help with Pattern MatchingGurhan Ozen29 Jan
    • Pattern Matching SolvedDouglas Brantz29 Jan
  • Re: Please Help with Pattern MatchingDan Nelson29 Jan
RE: Please Help with Pattern MatchingRoger Karnouk29 Jan