<?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: Gripe 3, 4 with Oracle &#8211; concat + magic quotes</title>
	<atom:link href="http://www.s1dd.com/2007/04/gripe-3-4-with-oracle-concat-magic-quotes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.s1dd.com/2007/04/gripe-3-4-with-oracle-concat-magic-quotes/</link>
	<description>My blog about everything not covered in my other blogs</description>
	<lastBuildDate>Mon, 18 Jul 2011 17:25:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Sidd</title>
		<link>http://www.s1dd.com/2007/04/gripe-3-4-with-oracle-concat-magic-quotes/comment-page-1/#comment-7</link>
		<dc:creator>Sidd</dc:creator>
		<pubDate>Sun, 13 May 2007 21:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.s1dd.com/2007/04/12/gripe-3-4-with-oracle-concat-magic-quotes/#comment-7</guid>
		<description>Thanks, something new for me to use :)</description>
		<content:encoded><![CDATA[<p>Thanks, something new for me to use <img src='http://www.s1dd.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://www.s1dd.com/2007/04/gripe-3-4-with-oracle-concat-magic-quotes/comment-page-1/#comment-5</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Thu, 10 May 2007 14:54:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.s1dd.com/2007/04/12/gripe-3-4-with-oracle-concat-magic-quotes/#comment-5</guid>
		<description>Yuck - the markup got removed from my last post but I&#039;m sure you can figure out what I typed...</description>
		<content:encoded><![CDATA[<p>Yuck &#8211; the markup got removed from my last post but I&#8217;m sure you can figure out what I typed&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alastair</title>
		<link>http://www.s1dd.com/2007/04/gripe-3-4-with-oracle-concat-magic-quotes/comment-page-1/#comment-4</link>
		<dc:creator>Alastair</dc:creator>
		<pubDate>Thu, 10 May 2007 14:52:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.s1dd.com/2007/04/12/gripe-3-4-with-oracle-concat-magic-quotes/#comment-4</guid>
		<description>I&#039;m not sure why you are using that concat function - its not the Oracle way of doing things - they probably added it to be ANSI compliant or something. Just use the &#124;&#124; operator:

select &#039;&lt;a&gt;&#039; &#124;&#124; varid &#124;&#124; &#039;&lt;/a&gt;&#039; as varlink ...

Also, there is a more sophisticated quoting mechanism which allows you to use single-quotes inside your quoted string without having to &quot;double them up&quot;:

select &#039;abc&#039;&#039;def&#039; the_old_way, q&#039;#abc&#039;def#&#039; the_new_way, q&#039;&#039;abc&#039;def&#039;&#039; an_alternative_way
from dual

The leading &#039;q&#039; character is mandatory as are the outer single-quotes. However, you have a wide range of choices for the inner character - I have shown it above with a hash character or a second single quote character but you could also use open and close brackets etc. Is this what you mean by magic quotes?

You can use this wherever a string literal is allowed so your above query could become:

select q&#039;&#039;&lt;a&gt;&#039;&#039; &#124;&#124; varid &#124;&#124; q&#039;&#039;&lt;/a&gt;&#039;&#039; as varlink ...</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure why you are using that concat function &#8211; its not the Oracle way of doing things &#8211; they probably added it to be ANSI compliant or something. Just use the || operator:</p>
<p>select &#8216;<a>&#8216; || varid || &#8216;</a>&#8216; as varlink &#8230;</p>
<p>Also, there is a more sophisticated quoting mechanism which allows you to use single-quotes inside your quoted string without having to &#8220;double them up&#8221;:</p>
<p>select &#8216;abc&#8221;def&#8217; the_old_way, q&#8217;#abc&#8217;def#&#8217; the_new_way, q&#8221;abc&#8217;def&#8221; an_alternative_way<br />
from dual</p>
<p>The leading &#8216;q&#8217; character is mandatory as are the outer single-quotes. However, you have a wide range of choices for the inner character &#8211; I have shown it above with a hash character or a second single quote character but you could also use open and close brackets etc. Is this what you mean by magic quotes?</p>
<p>You can use this wherever a string literal is allowed so your above query could become:</p>
<p>select q&#8221;<a>&#8221; || varid || q&#8221;</a>&#8221; as varlink &#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

