At 17:02 +0000 3/24/02, julian haffegee wrote:
>I currently have
>$result = mysql_query ("SELECT title_id, title FROM documents_tbl, url_tbl
>WHERE (documents_tbl.title_id = url_tbl.url_id) AND keywords LIKE '%$temp%'
>AND title_id != '$myrow[title_id]'");
>this works to an extent, but 'keywords' is a text field and if $temp is for
>example 'stem' I want it to match stem, and maybe stems but not system
>keywords RLIKE '[\s|^]$temp%[\s|s|$]'
>this would allow for a word at the start , end, surrounded by whitespace, or
>Obviously this does not work (why else would I ask you all?).
>Can anyone tell me what simple concept I have overlooked!
For one thing, you're using [...] to try to construct alternations.
[...] is for character classes, (...) is for alternations.