Hi.
I've got a classified ad program going. It's easy to search ads
SELECT id FROM ad WHERE text LIKE '%searchtext%'
BUT... here's a new problem.
I want let people register to get an email when a search term they want appears in a new ad.
I'm puzzled by best way to structure this.
Here's what I'm thinking:
Table1: Agent
id (autoincrement)
emailaddress
Table2: AgentSearchTerm
AgentId (relates to Agent table)
Term (one word string)
OK...now what?
I think my query wants to start:
SELECT emailaddress
FROM Agent, AgentSearchTerm
WHERE AgentSearchTerm.agentid=Agent.id
AND
(and...Here's where I start to get stumped)...
What do I need here? Some sort of substring function that rubs the terms against the text of the ad???
JUst writing this plea for help has made me bound the problem better. Any ideas/suggestions welcome.
Nemo