<?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: Tame SQL With Multiline Quotes in C# and PHP</title>
	<atom:link href="http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/</link>
	<description>Towards Intelligent Systems</description>
	<lastBuildDate>Tue, 23 Jun 2009 19:10:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: JJ</title>
		<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/comment-page-1/#comment-1095</link>
		<dc:creator>JJ</dc:creator>
		<pubDate>Tue, 14 Oct 2008 03:52:15 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/#comment-1095</guid>
		<description>in C and C++ you can do like java but without the + symbols.

 char* query=
  &quot; SELECT *&quot;
  &quot;   FROM foo&quot;
  &quot;   WHERE bar=66&quot; ;

but if you need linebreaks in the query you need to add them explicitly.</description>
		<content:encoded><![CDATA[<p>in C and C++ you can do like java but without the + symbols.</p>
<p> char* query=<br />
  &#8221; SELECT *&#8221;<br />
  &#8221;   FROM foo&#8221;<br />
  &#8221;   WHERE bar=66&#8243; ;</p>
<p>but if you need linebreaks in the query you need to add them explicitly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/comment-page-1/#comment-348</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 15 May 2008 20:59:59 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/#comment-348</guid>
		<description>Yes,  the &quot;here quotes&quot; in PHP are an effective way to do this too.</description>
		<content:encoded><![CDATA[<p>Yes,  the &#8220;here quotes&#8221; in PHP are an effective way to do this too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monk.e.boy</title>
		<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/comment-page-1/#comment-340</link>
		<dc:creator>monk.e.boy</dc:creator>
		<pubDate>Wed, 14 May 2008 14:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/#comment-340</guid>
		<description>damn, my formatting got lost.

monk.e.boy</description>
		<content:encoded><![CDATA[<p>damn, my formatting got lost.</p>
<p>monk.e.boy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: monk.e.boy</title>
		<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/comment-page-1/#comment-339</link>
		<dc:creator>monk.e.boy</dc:creator>
		<pubDate>Wed, 14 May 2008 14:20:14 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/#comment-339</guid>
		<description>Doesn&#039;t everyone do SQL in PHP like this? :

$sql = &lt;&lt;&lt;EOT

    SELECT *
    FROM stuff
    WHERE
      x=y

EOT;

// run $sql

Why would you write it any other way? ;-)

monk.e.boy</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t everyone do SQL in PHP like this? :</p>
<p>$sql = &lt;&lt;&lt;EOT</p>
<p>    SELECT *<br />
    FROM stuff<br />
    WHERE<br />
      x=y</p>
<p>EOT;</p>
<p>// run $sql</p>
<p>Why would you write it any other way? <img src='http://gen5.info/q/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>monk.e.boy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard@Home</title>
		<link>http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/comment-page-1/#comment-338</link>
		<dc:creator>Richard@Home</dc:creator>
		<pubDate>Wed, 14 May 2008 10:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/2008/05/13/tame-sql-with-multiline-quotes-in-c-and-php/#comment-338</guid>
		<description>In PHP you can use the heredoc syntax:

$query = &lt;&lt;&lt;SQL
SELECT
  foo,
  bar
FROM
  baz
WHERE foo=&#039;boo&#039;
SQL;

or just regular strings:
$query = &quot;
SELECT
...
&quot;;

or better yet - put it in a stored procedure ;-)</description>
		<content:encoded><![CDATA[<p>In PHP you can use the heredoc syntax:</p>
<p>$query = &lt;&lt;&lt;SQL<br />
SELECT<br />
  foo,<br />
  bar<br />
FROM<br />
  baz<br />
WHERE foo=&#8217;boo&#8217;<br />
SQL;</p>
<p>or just regular strings:<br />
$query = &#8221;<br />
SELECT<br />
&#8230;<br />
&#8220;;</p>
<p>or better yet &#8211; put it in a stored procedure <img src='http://gen5.info/q/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
