<?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>Harry Bailey &#187; SQL</title>
	<atom:link href="http://harrybailey.com/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://harrybailey.com</link>
	<description>just a little bit geeky</description>
	<lastBuildDate>Tue, 24 Aug 2010 12:15:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL Multiple Primary Key Columns In A Table</title>
		<link>http://harrybailey.com/2009/05/mysql-multiple-primary-key-columns-in-a-table/</link>
		<comments>http://harrybailey.com/2009/05/mysql-multiple-primary-key-columns-in-a-table/#comments</comments>
		<pubDate>Fri, 01 May 2009 13:46:23 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://harrybailey.com/?p=280</guid>
		<description><![CDATA[Some database management tools refuse to admit you can add multiple primary key columns to one table, so you might have to do it with direct sql syntax ( deep intake of breath ).
Multiple primary keys make &#8216;ON DUPLICATE KEY UPDATE column = column + 100&#8242; type queries a shed load more flexible.
Anyway, on with [...]]]></description>
			<content:encoded><![CDATA[<p>Some database management tools refuse to admit you can add multiple primary key columns to one table, so you might have to do it with direct sql syntax ( deep intake of breath ).</p>
<p>Multiple primary keys make &#8216;ON DUPLICATE KEY UPDATE column = column + 100&#8242; type queries a shed load more flexible.</p>
<p>Anyway, on with the code:</p>

<div class="wp_syntax"><div class="code"><pre class="sql sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> tablename <span style="color: #993333; font-weight: bold;">ADD</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>column_one<span style="color: #66cc66;">,</span> column_two<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>And there you have it. Robert&#8217;s your fathers brother.</p>
]]></content:encoded>
			<wfw:commentRss>http://harrybailey.com/2009/05/mysql-multiple-primary-key-columns-in-a-table/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Return Number Of Rows With PHP From SQL Database</title>
		<link>http://harrybailey.com/2009/04/return-number-of-rows-with-php-from-sql-database/</link>
		<comments>http://harrybailey.com/2009/04/return-number-of-rows-with-php-from-sql-database/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 20:52:29 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://harrybailey.com/?p=254</guid>
		<description><![CDATA[Occasionally working with SQL databases (not my beloved MySQL) I always struggled getting the number of rows in a consistant manner.
Until now&#8230;

It&#8217;s a simple fix. Add &#8216;ORDER BY&#8217; to your SQL select. It doesn&#8217;t matter if you are just getting back items where the order doesn&#8217;t matter, use an order by clause in your select [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally working with SQL databases (not my beloved MySQL) I always struggled getting the number of rows in a consistant manner.</p>
<p>Until now&#8230;</p>
<p><span id="more-254"></span></p>
<p>It&#8217;s a simple fix. Add &#8216;ORDER BY&#8217; to your SQL select. It doesn&#8217;t matter if you are just getting back items where the order doesn&#8217;t matter, use an order by clause in your select and you will always get the number of rows back successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://harrybailey.com/2009/04/return-number-of-rows-with-php-from-sql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
