<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1025364" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1025364</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1156419</link>
    <description> &lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I agree with you cmonkey, but andy206uk has an easy way to add relevance to the search results. How do you this? Does anyone has an example to share?&lt;/p&gt;
&lt;p&gt;Also I need to search multiple database tables.. how do I do this? Do I need to put my results in an array first?&lt;br /&gt;
An third problem, I would like to be able to search for multiple keywords.. Any idea?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Mark.&lt;/p&gt;
 </description>
     <pubDate>Tue, 10 Aug 2004 15:41:27 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1156419 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1154647</link>
    <description> &lt;p&gt;I second cmonkey here. Exactly how I&#039;d contruct the query as well. It all comes down to taste and coding style I suppose....&lt;/p&gt;
 </description>
     <pubDate>Tue, 06 Jul 2004 17:35:54 +0000</pubDate>
 <dc:creator>dudcore.net</dc:creator>
 <guid isPermaLink="false">comment 1154647 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1154411</link>
    <description> &lt;p&gt;True but I&#039;m pretty sure MATCH will only work on fulltext indexes, here&#039;s a little snippet from mysql.com:&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote:&lt;br /&gt;
The MATCH() function performs a natural language search for a string against a text collection. A collection is a set of one or more columns included in a FULLTEXT index. The search string is given as the argument to AGAINST(). The search is performed in case-insensitive fashion. For every row in the table, MATCH() returns a relevance value, that is, a similarity measure between the search string and the text in that row in the columns named in the MATCH() list.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;the rest of the info can be found here: &lt;a href=&quot;http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html&quot; class=&quot;bb-url&quot;&gt;http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;anyways, obviously there are multiple ways do different types of searches so I would just choose whichever is easier for you to set up, it doesn&#039;t sound like you need to do anything elaborate with it.&lt;/p&gt;
 </description>
     <pubDate>Sat, 03 Jul 2004 15:31:51 +0000</pubDate>
 <dc:creator>cmonkey</dc:creator>
 <guid isPermaLink="false">comment 1154411 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1154407</link>
    <description> &lt;p&gt;True... but LIKE just returns all results that meet the requirements. MATCH orders them by relevance.&lt;/p&gt;
 </description>
     <pubDate>Sat, 03 Jul 2004 13:08:31 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1154407 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1154396</link>
    <description> &lt;p&gt;If you are allowing the user to enter a search term I would suggest using LIKE in your query:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$query &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT fieldname1, fieldname2, FROM tablename WHERE &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$field&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; LIKE &#039;%&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$term&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;%&#039;\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; &lt;/p&gt;
&lt;p&gt;Its rairly a good idea to do a SELECT * query as stated above because it eats up a lot of server resources depending on the size of your database.  &lt;/p&gt;
&lt;p&gt;the LIKE statement will do a case-insensitive comparison between the $field value submitted (the field they are searching) and the search term they enter.  The % signs server as wild cards; so if any part of the value stored in that field contains whatever is between the two % signs it will be returned.&lt;/p&gt;
&lt;p&gt;you can get more info on &lt;a href=&quot;http://www.mysql.com&quot; class=&quot;bb-url&quot;&gt;mysql.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;hope that helps&lt;/p&gt;
 </description>
     <pubDate>Sat, 03 Jul 2004 04:37:29 +0000</pubDate>
 <dc:creator>cmonkey</dc:creator>
 <guid isPermaLink="false">comment 1154396 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/simple-search-mysql-php#comment-1154295</link>
    <description> &lt;p&gt;You need put the searchbox on a page and pass the $keyword variable to your search form, then simply use the following sql to find results ordered by relevence (like a proper search engine).&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT *, MATCH (fields,you,want,to,search) &lt;br /&gt;	&lt;br /&gt;		AGAINST (&amp;#039;$keyword&amp;#039;)&lt;br /&gt;AS score &lt;br /&gt;	&lt;br /&gt;		FROM `tablenamehere` &lt;br /&gt;				&lt;br /&gt;	ORDER BY `score` &lt;br /&gt;	&lt;br /&gt;	DESC&lt;br /&gt;	&amp;quot;; &lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Then just loop through the results and display as required. I hope that&#039;s clear enough.&lt;/p&gt;
 </description>
     <pubDate>Fri, 02 Jul 2004 08:28:11 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1154295 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
