<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Implicit casting you don&#039;t want to see around</title>
	<atom:link href="http://code.openark.org/blog/mysql/implicit-casting-you-dont-want-to-see-around/feed" rel="self" type="application/rss+xml" />
	<link>http://code.openark.org/blog/mysql/implicit-casting-you-dont-want-to-see-around</link>
	<description>Blog by Shlomi Noach</description>
	<lastBuildDate>Wed, 01 Feb 2012 20:47:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Monty Taylor</title>
		<link>http://code.openark.org/blog/mysql/implicit-casting-you-dont-want-to-see-around/comment-page-1#comment-15598</link>
		<dc:creator>Monty Taylor</dc:creator>
		<pubDate>Thu, 08 Jul 2010 22:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2344#comment-15598</guid>
		<description>++

I&#039;d also like to point out that passing in your numbers as strings causes the database server to create a Object representing the string value for them and then to convert that into a number which involves a bunch of conversion code. If you just pass it in as a number, then it gets directly shunted into a number in the parser from the protocol.

NEVER a good idea to use &quot;3&quot; if you want it to be a number.</description>
		<content:encoded><![CDATA[<p>++</p>
<p>I'd also like to point out that passing in your numbers as strings causes the database server to create a Object representing the string value for them and then to convert that into a number which involves a bunch of conversion code. If you just pass it in as a number, then it gets directly shunted into a number in the parser from the protocol.</p>
<p>NEVER a good idea to use "3" if you want it to be a number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giuseppe Maxia</title>
		<link>http://code.openark.org/blog/mysql/implicit-casting-you-dont-want-to-see-around/comment-page-1#comment-15537</link>
		<dc:creator>Giuseppe Maxia</dc:creator>
		<pubDate>Wed, 07 Jul 2010 10:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2344#comment-15537</guid>
		<description>Excellent advice, Shlomi.
For completeness, I should mention that, when using proper date arithmetic syntax, the implicit conversion works as expected.
&lt;pre&gt;
mysql&gt; SELECT &#039;2010-01-01&#039; + interval 3 day;
+-------------------------------+
&#124; &#039;2010-01-01&#039; + interval 3 day &#124;
+-------------------------------+
&#124; 2010-01-04                    &#124;
+-------------------------------+

mysql&gt; SELECT &#039;2010-01-01&#039; - interval 3 day;
+-------------------------------+
&#124; &#039;2010-01-01&#039; - interval 3 day &#124;
+-------------------------------+
&#124; 2009-12-29                    &#124;
+-------------------------------+
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Excellent advice, Shlomi.<br />
For completeness, I should mention that, when using proper date arithmetic syntax, the implicit conversion works as expected.</p>
<pre>
mysql&gt; SELECT '2010-01-01' + interval 3 day;
+-------------------------------+
| '2010-01-01' + interval 3 day |
+-------------------------------+
| 2010-01-04                    |
+-------------------------------+

mysql&gt; SELECT '2010-01-01' - interval 3 day;
+-------------------------------+
| '2010-01-01' - interval 3 day |
+-------------------------------+
| 2009-12-29                    |
+-------------------------------+
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mrten</title>
		<link>http://code.openark.org/blog/mysql/implicit-casting-you-dont-want-to-see-around/comment-page-1#comment-15536</link>
		<dc:creator>Mrten</dc:creator>
		<pubDate>Wed, 07 Jul 2010 09:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2344#comment-15536</guid>
		<description>fun if you combine the knowledge from this post with languages that have no strong type (say, php).</description>
		<content:encoded><![CDATA[<p>fun if you combine the knowledge from this post with languages that have no strong type (say, php).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

