<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1027173" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1027173</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/keyword-searchnotification#comment-1162311</link>
    <description> &lt;p&gt;Disclaimer: it&#039;s Friday night and my buzz is on, remember that when the above examples dont workl, or if they have nothing to do with the question.&lt;/p&gt;
 </description>
     <pubDate>Sat, 04 Dec 2004 02:44:07 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1162311 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/keyword-searchnotification#comment-1162310</link>
    <description> &lt;p&gt;What you need is another table associating email addresses with keywords, or more likely associating members with keywords.&lt;/p&gt;
&lt;p&gt;For example, from what I understand of what you&#039;re trying to do, I&#039;d take an approach like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;TABLE members (&lt;br /&gt;	memberid INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,&lt;br /&gt;	membername VARCHAR(100),&lt;br /&gt;	memberemail VARCHAR(100),&lt;br /&gt;	etc...&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;TABLE stories (&lt;br /&gt;	storyid INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,&lt;br /&gt;	storytitle VARCHAR(255) NOT NULL,&lt;br /&gt;	storydescription TEXT NOT NULL,&lt;br /&gt;	storytext TEXT NOT NULL,&lt;br /&gt;	etc...&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;TABLE keywords (&lt;br /&gt;	keywordid INT UNSIGNED NOT NULL PRIMARY KEY&lt;br /&gt;	keyword VARCHAR(100) UNIQUE NOT NULL&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;TABLE story_keywords (&lt;br /&gt;	storyid INT UNSIGNED NOT NULL,&lt;br /&gt;	keywordid INT UNSIGNED NOT NULL,&lt;br /&gt;	PRIMARY_KEY(storyid, keywordid)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;TABLE member_keywords (&lt;br /&gt;	memberid INT UNSIGNED NOT NULL,&lt;br /&gt;	keywordid INT UNSIGNED NOT NULL,&lt;br /&gt;	PRIMARY_KEY(storyid, keywordid)&lt;br /&gt;);&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Now, assuming your program populated these tables accurately, let&#039;s say you have a specific keyword you want to notify members about, members who want to know about that keyword, such as &#039;fishing&#039;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT DISTINCT m.memberemail&lt;br /&gt;FROM members AS m&lt;br /&gt;INNER JOIN member_keywords AS mk ON m.memberid=mk.memberid&lt;br /&gt;INNER JOIN keywords AS k ON mk.keywordid=k.keywordid&lt;br /&gt;WHERE&amp;nbsp; k.keyword=&amp;#039;fishing&amp;#039;&lt;br /&gt;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;The above query should give you the email of every member associated with the keyword &#039;fishing&#039;.&lt;/p&gt;
&lt;p&gt;Similarly, if you want to notify everyone associated with every keyward associated with a story, say storyid 834:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT DISTINCT m.memberemail&lt;br /&gt;FROM stories AS s&lt;br /&gt;INNER JOIN story_keywords AS sk ON s.storyid=sk.storyid&lt;br /&gt;INNER JOIN keywords AS k ON sk.keywordid=k.keywordid&lt;br /&gt;INNER JOIN member_keywords AS mk ON sk.keywordid=mk.keywordid&lt;br /&gt;INNER JOIN members AS m ON mk.memberid=m.memberid&lt;br /&gt;WHERE s.storyid=&amp;#039;834&amp;#039;&lt;br /&gt;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Sat, 04 Dec 2004 02:40:16 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1162310 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/keyword-searchnotification#comment-1162023</link>
    <description> &lt;p&gt;rows - columns ...&lt;br /&gt;
the email is something I thought about after I mentioned the arrary method as it wont work as I don&#039;t have the email in that column.&lt;br /&gt;
At the moment I am playing with something like:&lt;/p&gt;
&lt;p&gt;$themboth = strtolower($title, $description);&lt;br /&gt;
select * from keyword_table; (* = id, user and keyword)&lt;br /&gt;
while(result = query)&lt;br /&gt;
{&lt;br /&gt;
  $match = strstr($themboth, strtolower($result[&#039;keyword&#039;]));&lt;br /&gt;
  if($match){ get email from another column from result[&#039;user&#039;] and send it; }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;of course with the right syntax, this was just off the top of my head as the code I have on the page is a little bit of this and a little bit of that (trying different things).&lt;br /&gt;
The above would work but if it can be a lot of database queries if people used simple words like &#039;the&#039;, &#039;and&#039;, &#039;php&#039;, &#039;html&#039;, &#039;code&#039; ... I can only really restrict it to a minimum of 3 characters as things like php, css etc are 3.&lt;br /&gt;
If I restrict the simple words (the, and etc) things like &quot;show the code&quot; would become &quot;show code&quot; and not match &quot;show the code&quot;. &lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
 </description>
     <pubDate>Sun, 28 Nov 2004 02:12:28 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1162023 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/keyword-searchnotification#comment-1162018</link>
    <description> &lt;p&gt;I think you mean you have two database columns, one with keywords and the other with story title/desc.  The question is, where are the emails and how are they related to your keyword table?&lt;/p&gt;
 </description>
     <pubDate>Sat, 27 Nov 2004 21:43:44 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1162018 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
