This is the problem with helping online. The meaning of the words are in the one posting… I am still not
really clear on what you need. You said you wanted to remove tags from search keys? Right? Do you mean
that you want to remove tags from the output of the queries?
Re-reading your first post, you have a database of terms. You replace the terms in your site with tags.
And, you want to search for the items in your database. So, does that mean that your data in the database
for the field “text” is like the sample: {gloss ID|term|mouseover text} and you want to do a query to
search just for the term? If so, you can do it this way…
( Not tested as I do not have that database here… LOL )
“SELECT * FROM database WHERE
SUBSTR(text, LOCATE(’|’, text)+1, (CHAR_LENGTH(text) - LOCATE(’|’, REVERSE(text)) - LOCATE(’|’, text)))
LIKE %” . $srch . “% ORDER BY id”
Basically, it takes the data in the field “text” which is like: {gloss ID|term|mouseover text} and it locates
the starting " | " and ending " | " and takes the sub-string of it and then does the LIKE. It is a very hard
coding to sort out and is a bit complicated. If you break it down into parts, it might be easier to understand.
Get the start of the term, the position after the first “|” , get the position of the last “|” and then take out
the text in between. Then, use that for the LIKE comparision…
Hope that is really what you want… Good luck!