<?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>Web Development London UK &#187; mysql</title>
	<atom:link href="http://hsmoore.com/blog/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://hsmoore.com</link>
	<description>Web Development London UK</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:10:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>LEN in MySQL</title>
		<link>http://hsmoore.com/blog/len-in-mysql/</link>
		<comments>http://hsmoore.com/blog/len-in-mysql/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 12:10:18 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[len]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://hsmoore.com/?p=1416</guid>
		<description><![CDATA[In MySQL 5.1 LEN is called LENGTH, you use it exactly the same and pass in the link, so: LENGTH(link).]]></description>
			<content:encoded><![CDATA[<p>In MySQL 5.1 LEN is called LENGTH, you use it exactly the same and pass in the link, so: LENGTH(link).</p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/len-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Error: Can&#8217;t get hostname for your address</title>
		<link>http://hsmoore.com/blog/mysql-error-cant-get-hostname-for-your-address/</link>
		<comments>http://hsmoore.com/blog/mysql-error-cant-get-hostname-for-your-address/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 15:15:41 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[error]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[my.cnf]]></category>
		<category><![CDATA[skip-name-resolve]]></category>

		<guid isPermaLink="false">http://hsmoore.com/?p=1392</guid>
		<description><![CDATA[This error is thrown by MySQL because it tries to do a DNS lookup on the address connecting to the server and it fails due to the IP not being able to be resolved back to a name or some-other deeper DNS bust problem. The easiest way to fix this is to edit your my.ini...]]></description>
			<content:encoded><![CDATA[<p>This error is thrown by MySQL because it tries to do a DNS lookup on the address connecting to the server and it fails due to the IP not being able to be resolved back to a name or some-other deeper DNS bust problem.</p>
<p>The easiest way to fix this is to edit your my.ini or my.cnf (/etc/my.cnf) and in the<br />
[mysqld] section add the &#8220;skip-name-resolve&#8221; option.</p>
<p>Near the top of the file this will look similar to the below:</p>
<pre>
<div class="codesnip-container" >[mysqld]
skip-name-resolve</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/mysql-error-cant-get-hostname-for-your-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2014 &#8211; Commands out of sync; you can&#039;t run this command now</title>
		<link>http://hsmoore.com/blog/2014-commands-out-of-sync-you-cant-run-this-command-now/</link>
		<comments>http://hsmoore.com/blog/2014-commands-out-of-sync-you-cant-run-this-command-now/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 13:06:02 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://andrewodendaal.com/?p=1269</guid>
		<description><![CDATA[#2014 &#8211; Commands out of sync; you can&#8217;t run this command now Now that can be a really annoying error! It happens when querying stored procedures in phpMyAdmin as mysqli seems to return 2 sets of results opposed to the usual 1 that mysql returns. You cannot call anything else until you have &#8220;flushed&#8221; or...]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">#2014 &#8211; Commands out of sync; you can&#8217;t run this command now</span></p>
<p>Now that can be a really annoying error!</p>
<p>It happens when querying stored procedures in phpMyAdmin as mysqli seems to return 2 sets of results opposed to the usual 1 that mysql returns.</p>
<p>You cannot call anything else until you have &#8220;flushed&#8221; or &#8220;cleared&#8221; the second result.</p>
<p>You can try using COMMIT to resolve this.</p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/2014-commands-out-of-sync-you-cant-run-this-command-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why we don&#039;t choose MSSQL!</title>
		<link>http://hsmoore.com/blog/why-we-dont-choose-mssql/</link>
		<comments>http://hsmoore.com/blog/why-we-dont-choose-mssql/#comments</comments>
		<pubDate>Wed, 26 May 2010 11:45:36 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.andrewodendaal.com/?p=862</guid>
		<description><![CDATA[Everybody always raves how great Microsoft SQL Server is, and how much data it can hold, and how much bigger it&#8217;s &#8220;package&#8221; is than your own. But the truth is that I hate it with a passion! I use RDBMS&#8216; on a daily basis and never used to hate MSSQL so much until recently when...]]></description>
			<content:encoded><![CDATA[<p>Everybody always raves how great Microsoft SQL Server is, and how much data it can hold, and how much bigger it&#8217;s &#8220;package&#8221; is than your own.</p>
<p>But the truth is that I hate it with a passion!</p>
<p>I use <a title="Opens in new tab/window" href="http://en.wikipedia.org/wiki/Relational_database_management_system" target="_blank">RDBMS</a>&#8216; on a daily basis and never used to hate MSSQL so much until recently when I had to modify a very large site that was built in <a title="Opens in new tab/window" href="http://en.wikipedia.org/wiki/Disease" target="_blank">Classic ASP(yuck) and MSSQL</a>.</p>
<p>The way the whole thing was setup made life a real nightmare to deal with and everytime I wanted to do the simplest thing, I would be hit with thousands of problems, from linked tables that I would have to affect my changes &#8220;manually&#8221; in multiple places to stored procedures that just wouldn&#8217;t execute because everything was done so manually.</p>
<p>This is merely a rant from me as doing the whole thing from scratch using MySQL would have been faster and also much easier for anyone to maintain thereafter. This problem was definitely hightened due to the coding language in the site itself being VB which is just nasty!</p>
<p>I always seem to have these rediculous issues when I delve into the Microsoft Programmers world &#8211; bear in mind that I used to do a LOT of Microsoft coding of my own a few years back, and decided to move away from it for many many good reasons just like experiences of this kind.</p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/why-we-dont-choose-mssql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL Main Query Types used in PHP to select, insert, update and delete data</title>
		<link>http://hsmoore.com/blog/mysql-main-query-types-used-in-php-to-select-insert-update-and-delete-data/</link>
		<comments>http://hsmoore.com/blog/mysql-main-query-types-used-in-php-to-select-insert-update-and-delete-data/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 10:25:03 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Interesting]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql_query]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.andrewodendaal.com/?p=625</guid>
		<description><![CDATA[MySQL Main Query Types SELECT SELECT * FROM tablename INSERT INSERT INTO tablename (col1, col2, col3,..) VALUES (val1, val2, val3,&#8230;) UPDATE UPDATE tablename SET `col1`=`val1`, `col2`=`val2`, `col3`=`val3`,&#8230; DELETE DELETE FROM tablename WHERE `col4`=`val6` Note You will use a lot of WHERE clauses as well along with the above. e.g. SELECT * FROM tablename WHERE `id`=&#8217;15&#8242;...]]></description>
			<content:encoded><![CDATA[<h1>MySQL Main Query Types</h1>
<h2>SELECT</h2>
<p>SELECT * FROM tablename</p>
<h2>INSERT</h2>
<p>INSERT INTO tablename (col1, col2, col3,..) VALUES (val1, val2, val3,&#8230;)</p>
<h2>UPDATE</h2>
<p>UPDATE tablename SET `col1`=`val1`, `col2`=`val2`, `col3`=`val3`,&#8230;</p>
<h2>DELETE</h2>
<p>DELETE FROM tablename WHERE `col4`=`val6`</p>
<h1>Note</h1>
<p>You will use a lot of WHERE clauses as well along with the above.</p>
<p><strong>e.g.</strong> <em>SELECT * FROM tablename WHERE `id`=&#8217;15&#8242;</em></p>
<h1>In PHP</h1>
<p>Calling to MySQL is really easy in PHP, just use the mysql_query() function.</p>
<p><strong>e.g.</strong></p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><a href="http://www.php.net/mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="st0">&quot;SELECT * FROM tablename&quot;</span><span class="br0">&#41;</span><br />
<span class="re0">$query</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="st0">&quot;SELECT * FROM tablename&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw1">while</span> <span class="br0">&#40;</span><span class="re0">$result</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_fetch_object"><span class="kw3">mysql_fetch_object</span></a><span class="br0">&#40;</span><span class="re0">$query</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">echo</span> <span class="re0">$result</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>aColumnNameInMysql<span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/mysql-main-query-types-used-in-php-to-select-insert-update-and-delete-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect to mysql database from php</title>
		<link>http://hsmoore.com/blog/connect-to-mysql-database-from-php/</link>
		<comments>http://hsmoore.com/blog/connect-to-mysql-database-from-php/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 10:05:03 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.andrewodendaal.com/?p=622</guid>
		<description><![CDATA[If you need to connect to a mysql database from php you can do it like this: &#60;?php&#62; &#160; &#160;$DBH = &#8216;localhost&#8217;; &#160; &#160;$DBU = &#8216;root&#8217;; &#160; &#160;$DBPWD = &#8216;password&#8217;; &#160; &#160;$DBN = &#8216;petstore&#8217;; &#160; &#160;$conn = mysql_connect&#40;$DBH, $DBU, $DBPWD&#41; or die &#160;&#40;&#34;Error: Could not connect to database.&#34;&#41;; &#160; &#160;mysql_select_db&#40;$dbname&#41;; ?&#62; This allows you to...]]></description>
			<content:encoded><![CDATA[<p>If you need to connect to a mysql database from php you can do it like this:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="sy1">&lt;?</span>php<span class="sy0">&gt;</span><br />
&nbsp; &nbsp;<span class="re0">$DBH</span> <span class="sy0">=</span> <span class="st_h">&#8216;localhost&#8217;</span><span class="sy0">;</span><br />
&nbsp; &nbsp;<span class="re0">$DBU</span> <span class="sy0">=</span> <span class="st_h">&#8216;root&#8217;</span><span class="sy0">;</span><br />
&nbsp; &nbsp;<span class="re0">$DBPWD</span> <span class="sy0">=</span> <span class="st_h">&#8216;password&#8217;</span><span class="sy0">;</span><br />
&nbsp; &nbsp;<span class="re0">$DBN</span> <span class="sy0">=</span> <span class="st_h">&#8216;petstore&#8217;</span><span class="sy0">;</span><br />
&nbsp; &nbsp;<span class="re0">$conn</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_connect"><span class="kw3">mysql_connect</span></a><span class="br0">&#40;</span><span class="re0">$DBH</span><span class="sy0">,</span> <span class="re0">$DBU</span><span class="sy0">,</span> <span class="re0">$DBPWD</span><span class="br0">&#41;</span> or <a href="http://www.php.net/die"><span class="kw3">die</span></a> &nbsp;<span class="br0">&#40;</span><span class="st0">&quot;Error: Could not connect to database.&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp;<a href="http://www.php.net/mysql_select_db"><span class="kw3">mysql_select_db</span></a><span class="br0">&#40;</span><span class="re0">$dbname</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="sy1">?&gt;</span></div>
</div>
<p>This allows you to make a connection to the mysql database and gets it ready for you to make queries and manipulate the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/connect-to-mysql-database-from-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource</title>
		<link>http://hsmoore.com/blog/warning-mysql_affected_rows-supplied-argument-is-not-a-valid-mysql-link-resource/</link>
		<comments>http://hsmoore.com/blog/warning-mysql_affected_rows-supplied-argument-is-not-a-valid-mysql-link-resource/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:54:35 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[mysql_affected_rows]]></category>
		<category><![CDATA[mysql_query]]></category>

		<guid isPermaLink="false">http://blog.andrewodendaal.com/?p=403</guid>
		<description><![CDATA[Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource You have just gotten a warning when trying to check if an inserted row was successful but when calling mysql_affected_rows(mysql_query(&#8220;INSERT INTO&#8230;&#8230;&#8221;)) you get a warning telling you that the supplied argument is not a valid MySQL-Link resource. This is because mysql_query INSERT actually returns true...]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><em>Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource</em></span></p>
<p>You have just gotten a warning when trying to check if an inserted row was successful but when calling mysql_affected_rows(mysql_query(&#8220;INSERT INTO&#8230;&#8230;&#8221;)) you get a warning telling you that the supplied argument is not a valid MySQL-Link resource.</p>
<p>This is because mysql_query INSERT actually returns true or false and not a resource id.</p>
<p>So rather do this:</p>
<p><em><span style="color: #ff0000;">if (mysql_query(&#8220;INSERT INTO&#8230;&#8221;))</span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/warning-mysql_affected_rows-supplied-argument-is-not-a-valid-mysql-link-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mySQL select multiple ids</title>
		<link>http://hsmoore.com/blog/mysql-select-multiple-ids/</link>
		<comments>http://hsmoore.com/blog/mysql-select-multiple-ids/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 12:44:51 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Interesting]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.andrewodendaal.com/?p=352</guid>
		<description><![CDATA[SELECT * FROM tablename WHERE `active`=&#8217;1&#8242; AND `id` IN (&#8217;107&#8242; , &#8217;125&#8242; ) ORDER BY `id` DESC LIMIT 12]]></description>
			<content:encoded><![CDATA[<p>SELECT * FROM tablename WHERE `active`=&#8217;1&#8242; AND `id` IN (&#8217;107&#8242; , &#8217;125&#8242; ) ORDER BY `id` DESC LIMIT 12</p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/mysql-select-multiple-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mySQL Development Tools</title>
		<link>http://hsmoore.com/blog/mysql-development-tools/</link>
		<comments>http://hsmoore.com/blog/mysql-development-tools/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 11:40:55 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://blog.andrewodendaal.com/?p=292</guid>
		<description><![CDATA[I came across a very interesting article about mySQL Development Tools. http://www.smashingmagazine.com/2009/03/25/mysql-admin-and-development-tools-round-up/]]></description>
			<content:encoded><![CDATA[<p>I came across a very interesting article about mySQL Development Tools.</p>
<p><a title="Opens in New Tab/Window" href="http://www.smashingmagazine.com/2009/03/25/mysql-admin-and-development-tools-round-up/">http://www.smashingmagazine.com/2009/03/25/mysql-admin-and-development-tools-round-up/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hsmoore.com/blog/mysql-development-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

