<?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>PHP Developer &#187; SQL</title>
	<atom:link href="http://php-developer.co.za/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://php-developer.co.za</link>
	<description>Just another PsyWeb Sites site</description>
	<lastBuildDate>Fri, 25 Nov 2011 10:49:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Tis the season&#8230;..</title>
		<link>http://php-developer.co.za/2010/12/07/tis-the-season/</link>
		<comments>http://php-developer.co.za/2010/12/07/tis-the-season/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 07:36:35 +0000</pubDate>
		<dc:creator>phpdeveloper</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.php-developer.co.za/?p=69</guid>
		<description><![CDATA[Its that time of year again, where we look forward to family gathering, presents and stuffing our faces with copious amounts of food. In the meantime, we have the PHP Advent Calendar, to count down the days to Christmas and learn some new PHP goodies for the new year.]]></description>
			<content:encoded><![CDATA[<p>Its that time of year again, where we look forward to family gathering, presents and stuffing our faces with copious amounts of food.</p>
<p>In the meantime, we have the <a title="PHP Advent" href="http://phpadvent.org/2010" target="_blank">PHP Advent</a> Calendar, to count down the days to Christmas and learn some new PHP goodies for the new year.</p>
]]></content:encoded>
			<wfw:commentRss>http://php-developer.co.za/2010/12/07/tis-the-season/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: filtering results from a list of id&#039;s</title>
		<link>http://php-developer.co.za/2009/01/18/mysql-filtering-results-from-a-list-of-ids/</link>
		<comments>http://php-developer.co.za/2009/01/18/mysql-filtering-results-from-a-list-of-ids/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 08:32:14 +0000</pubDate>
		<dc:creator>phpdeveloper</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.php-developer.co.za/?p=8</guid>
		<description><![CDATA[A short while ago I posted about testing if a variable exists in a list and I spoke about the MySQL &#8220;IN&#8221; keyword. I realised this week that not everyone knows about the MySQL &#8220;IN&#8221; keyword, so I&#8217;ve decided to explain this very handy SQL keyword. Lets say you have a user table with the [...]]]></description>
			<content:encoded><![CDATA[<p>A short while ago I posted about testing if a variable exists in a list and I spoke about the MySQL &#8220;IN&#8221; keyword.</p>
<p>I realised this week that not everyone knows about the MySQL &#8220;IN&#8221; keyword, so I&#8217;ve decided to explain this very handy SQL keyword.</p>
<p>Lets say you have a user table with the following fields; user_id, username, password. You have a list of user ids (eg 1, 3, 5) and you want to draw the usernames and passwords for these users.</p>
<p>You could use the following SQL code:</p>
<blockquote><p>SELECT `username`, `password` FROM `user`<br />
WHERE `user_id` = 1 AND WHERE `user_id` = 3 AND WHERE `user_id` = 5;</p></blockquote>
<p>Now while this is correct and will return the required results, it is quite a bit to code (especially if you have a larger list of user ids). Here comes the &#8220;IN&#8221; keyword to save us.</p>
<blockquote><p>SELECT `username`, `password` FROM `user` WHERE `user_id` IN (1, 3, 5);</p></blockquote>
<p>See how easy that is. Now if you have a much larger list (or the list grows) you simply add the user ids to the comma delimited list. Less time spent, and the same result. I&#8217;m all about the shortcuts&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://php-developer.co.za/2009/01/18/mysql-filtering-results-from-a-list-of-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

