<?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>João Morais &#187; Fix</title>
	<atom:link href="http://www.blog.joaomorais.com/tag/fix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.joaomorais.com</link>
	<description>Blog about web development, high technology, new projects and development tools.</description>
	<lastBuildDate>Sun, 21 Mar 2010 20:03:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Trust Universal Laptop Power Supplier Fix</title>
		<link>http://www.blog.joaomorais.com/trust-universal-laptop-power-supplier-fix/</link>
		<comments>http://www.blog.joaomorais.com/trust-universal-laptop-power-supplier-fix/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 11:29:52 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Reportages]]></category>
		<category><![CDATA[Charger]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[Laptop]]></category>
		<category><![CDATA[Power]]></category>
		<category><![CDATA[Supplier]]></category>
		<category><![CDATA[Trust]]></category>
		<category><![CDATA[Universal]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=355</guid>
		<description><![CDATA[Around one and a half years my laptop&#8217;s charger died, after five years of intense usage it&#8217;s understandable. At that time I&#8217;ve chosen to buy an Universal charger from Trust which seemed a nice choice at the moment.
Last month it decided not to work, with exactly the same kind of problems the first one had: [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-356" title="Trust Universal Laptop Power Supplier" src="http://blog.joaomorais.com/wp-content/uploads/trust-power-adapter-150x150.jpg" alt="Trust Universal Laptop Power Supplier" width="120" height="120" />Around one and a half years my laptop&#8217;s charger died, after five years of intense usage it&#8217;s understandable. At that time I&#8217;ve chosen to buy an Universal charger from Trust which seemed a nice choice at the moment.</p>
<p>Last month it decided not to work, with exactly the same kind of problems the first one had: the end of the wire near the charger box seemed to be broken.</p>
<p><span id="more-355"></span>Instead of go out and buy another charger I&#8217;ve decided to open it and try to solve the issue. You can view a full <a title="Photo Reportage: Trust Universal Laptop Power Supplier Fix" href="http://www.flickr.com/photos/joaomorais/sets/72157621891073322/">photo reportage</a> in <a title="My flickr gallery" href="http://www.flickr.com/photos/joaomorais/">my flickr gallery</a>.</p>
<p>The solution was quite simple and after one month and a couple of days it&#8217;s still working with no problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.joaomorais.com/trust-universal-laptop-power-supplier-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL bug related with natural number order fix</title>
		<link>http://www.blog.joaomorais.com/mysql-bug-related-with-natural-number-order-fix/</link>
		<comments>http://www.blog.joaomorais.com/mysql-bug-related-with-natural-number-order-fix/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 10:11:21 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[Number]]></category>
		<category><![CDATA[Order]]></category>

		<guid isPermaLink="false">http://solidlocker.webhs.org/wordpress/?p=161</guid>
		<description><![CDATA[It seems that this is a known bug but I only noticed it yesterday.
Imagine you have a field named price and it&#8217;s type is VARCHAR (it doesn&#8217;t matter why it&#8217;s not INT or FLOAT) and you want to use ORDER BY clause so you can list table rows ordered by price value.
It won&#8217;t work, since [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that this is a known bug but I only noticed it yesterday.</p>
<p>Imagine you have a field named price and it&#8217;s type is VARCHAR (it doesn&#8217;t matter why it&#8217;s not INT or FLOAT) and you want to use ORDER BY clause so you can list table rows ordered by price value.</p>
<p>It won&#8217;t work, since the prices will be listed alphabetically, you may read here how to fix this issue.</p>
<p><span id="more-161"></span>If you have a table labeled products, a field labeled price (typed as VARCHAR) and the following values: 1, 2, 3, 7, 8, 53, 47, 32, 99 and 327.</p>
<p>And you perform a query similar to the one below:</p>
<pre class="brush:sql">SELECT price FROM products ORDER BY price;</pre>
<p>The result will be:</p>
<pre class="brush:plain">1, 2, 3, 32, 327,47, 53, 7, 8, 99</pre>
<p>As you can see the product prices are ordered alphabetically to fix this you should add + 0 to the query (see example below):</p>
<pre class="brush:sql">SELECT price FROM products ORDER BY price + 0;</pre>
<p>The result will be:</p>
<pre class="brush:plain">1, 2, 3, 7, 8, 32, 47, 53, 99, 327</pre>
<p>Problem solved, now your rows will be sorted by price correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.joaomorais.com/mysql-bug-related-with-natural-number-order-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
