<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NewSourceMedia Blog &#187; data-driven</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/data-driven/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Fri, 30 Dec 2011 04:30:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>PHP Search using WHERE, AND, LIKE, OR Query Functions</title>
		<link>http://newsourcemedia.com/blog/php-search-using-where-and-like-or-query-functions/</link>
		<comments>http://newsourcemedia.com/blog/php-search-using-where-and-like-or-query-functions/#comments</comments>
		<pubDate>Sat, 17 Jul 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL / Database]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[content management system]]></category>
		<category><![CDATA[data-driven]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mutiple]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[where]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2004/07/16/php-search-using-where-and-like-or-query-functions/</guid>
		<description><![CDATA[How to search multiple fields in a database Search using WHERE, AND, LIKE, OR Query Functions Looking for an exact match in field1: SELECT * FROM table WHERE field1 = '$name' Looking if the field1 contains the search word anywhere &#8230; <a href="http://newsourcemedia.com/blog/php-search-using-where-and-like-or-query-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[How to search multiple fields in a database
<span id="more-190"></span>

<strong>Search using WHERE, AND, LIKE, OR Query Functions</strong>
<ol>
	<li>Looking for an exact match in field1:
<span class="sourceCODE">SELECT * FROM table WHERE field1 = '$name'</span></li>
	<li>Looking if the field1 contains the search word anywhere using LIKE and both  '%%'
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '%$word%'</span></li>
	<li>Looking if the field1 contains the value that begins with our word using LIKE  and the last ' %'
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '$word%'</span></li>
	<li>Looking if the field1 contains the value that ends with our word using LIKE  and the first '% '
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '%$word'</span></li>
	<li>Looking if our search word appears in both fields using AND
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '%$word%' AND field2  LIKE '%$word%'</span></li>
	<li>Looking if our search word appears in any of the two fields using OR
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '%$word%' OR field2  LIKE '%$word%'</span></li>
	<li>Looking if our word is in field1 OR in field2 AND field3 using Parentheses
<span class="sourceCODE">SELECT * FROM table WHERE field1 LIKE '%$word%' OR (field2  LIKE '%$word%' AND field2 LIK</span></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/php-search-using-where-and-like-or-query-functions/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
