I have a table like this one:

+-----+-----------+-------+
| uid | username  | query |
+-----+-----------+-------+
|   1 | someuser  | %qu1% |
|   2 | anotheru  | bla%  |
+-----+-----------+-------+

I get a string from external source, let's say the string is 'blahblah'.

Now I need a query which will take the values from column 'query', treat
them
as patterns for matching and return row(s) which match the given string
'blahblah'. In this example, the matched data is obviously in second row.
(bla% matches blahblah)

Do I make any sense? Is this possible?
Any help will be greatly appreciated.


---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to