<?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>Stephen Gray&#039;s dev blog &#187; custom</title>
	<atom:link href="http://blog.s-gray.com/tag/custom/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.s-gray.com</link>
	<description>e-commerce and integrations</description>
	<lastBuildDate>Sun, 17 Jan 2010 09:32:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Custom SQL in symfony 1.2.3</title>
		<link>http://blog.s-gray.com/2009/06/29/custom-sql-in-symfony-1-2-3/</link>
		<comments>http://blog.s-gray.com/2009/06/29/custom-sql-in-symfony-1-2-3/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 09:59:24 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://colourgray.wordpress.com/?p=128</guid>
		<description><![CDATA[A small snippet for performing custom SQL queries using symfony 1.2.3. The method to do this has varied slightly with the different symfony releases.]]></description>
			<content:encoded><![CDATA[<p>Quick one. A small snippet for performing custom SQL queries using symfony 1.2.3. The method to do this has varied slightly with the different symfony releases. The method found on the symfony site almost has a good example, this is just adding a bit to it (looping);</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p128code1'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p1281"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p128code1"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> Propel<span style="color: #339933;">::</span><span style="color: #004000;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'SELECT * FROM `my_table`;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$statement</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$statement</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$rowObj</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$statement</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch</span><span style="color: #009900;">&#40;</span>PDO<span style="color: #339933;">::</span><span style="color: #004000;">FETCH_OBJ</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <a href="http://www.php.net/var_dump"><span style="color: #990000;">var_dump</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rowObj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Stephen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.s-gray.com/2009/06/29/custom-sql-in-symfony-1-2-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

