Hi,

I have recently gained access to mysql (new isp), and am converting my old
text databases to sql ones. I had a text database with a field 'keywords'. I
have entered them as one field, What I want to do is submit a query where I
can ask if this field CONTAINS rather than equals a string. Can you use
regular expressions in this way?

I want to have something like

$result = mysql_query ("SELECT title, keywords, description   FROM documents
WHERE keywords='$word'");

but with  keywords 'contains' '$word'

a bit like keywords =~ m/$word/g in perl

How would you all go about this? should I set my database up differently?
Thanks very much!
Jules




---------------------------------------------------------------------
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