<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019694" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019694</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/search-database-help#comment-1118621</link>
    <description> &lt;p&gt;For a speed boost, try using this:&lt;br /&gt;
&quot;SELECT * FROM cp_pages WHERE INSTR(content,&#039;$item&#039;) LIMIT 0, 30&quot;&lt;/p&gt;
&lt;p&gt;INSTR() is a basic string comparison, while LIKE uses basic pattern matching ( &#039;_&#039; = single char; &#039;*&#039; = 0 or more chars).&lt;/p&gt;
&lt;p&gt;Also note about INSTR(): This function is multi-byte safe. In MySQL 3.23 this function is case sensitive, while in 4.0 it&#039;s only case-sensitive if either argument is a binary string.&lt;/p&gt;
&lt;p&gt;mySQL Docs:&lt;br /&gt;
&lt;a href=&quot;http://www.mysql.com/doc/en/String_functions.html&quot; class=&quot;bb-url&quot;&gt;6.3.2 String Functions&lt;/a&gt;: INSTR()&lt;br /&gt;
&lt;a href=&quot;http://www.mysql.com/doc/en/String_comparison_functions.html&quot; class=&quot;bb-url&quot;&gt;6.3.2.1 String Comparison Functions&lt;/a&gt;: LIKE&lt;/p&gt;
 </description>
     <pubDate>Fri, 15 Nov 2002 07:19:32 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1118621 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/search-database-help#comment-1118606</link>
    <description> &lt;p&gt;Actually in MySQL wildcard is % not * so the correct MySQL query would be...&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;$data &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_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 * FROM cp_pages WHERE content LIKE &#039;%&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$item&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;%&#039; LIMIT 0, 30\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Also I suggest you use mysql_fetch_assoc() instead of mysql_fetch_array() if you&#039;re only going to use $row[&quot;name&quot;] and not $row[0]&lt;/p&gt;
 </description>
     <pubDate>Fri, 15 Nov 2002 02:44:22 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1118606 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/search-database-help#comment-1118603</link>
    <description> &lt;p&gt;Era,&lt;/p&gt;
&lt;p&gt;I&#039;m not familiar with PHP but I don&#039;t think you have to put single quotes in your select statement:&lt;/p&gt;
&lt;p&gt;&quot;SELECT * FROM `cp_pages` WHERE `content` LIKE &#039;*$item*&#039; LIMIT 0, 30&quot;&lt;/p&gt;
&lt;p&gt;Try:&lt;/p&gt;
&lt;p&gt;&quot;SELECT * FROM cp_pages WHERE content LIKE &#039;&quot; + $item + &quot;&#039;  LIMIT 0, 30&quot;&lt;/p&gt;
&lt;p&gt;I&#039;m not sure about the + $item + part, just coded it like JavaScript, maybe a php person could chime in?&lt;/p&gt;
 </description>
     <pubDate>Fri, 15 Nov 2002 02:37:05 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1118603 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
