<?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: 12 Things Mango Wishes He&#039;d Known When He Was a PHP N00b.</title>
	<atom:link href="http://www.toao.net/266-essential-php-tips/feed" rel="self" type="application/rss+xml" />
	<link>http://www.toao.net/266-essential-php-tips</link>
	<description>by Mango</description>
	<lastBuildDate>Fri, 02 Jul 2010 13:42:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Mango</title>
		<link>http://www.toao.net/266-essential-php-tips/comment-page-1#comment-924</link>
		<dc:creator>Mango</dc:creator>
		<pubDate>Mon, 29 Jun 2009 22:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.toao.net/?p=266#comment-924</guid>
		<description>Thanks for elaborating!  Everyone, take note :)</description>
		<content:encoded><![CDATA[<p>Thanks for elaborating!&nbsp; Everyone, take note <img src='http://www.toao.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />&nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Mather</title>
		<link>http://www.toao.net/266-essential-php-tips/comment-page-1#comment-923</link>
		<dc:creator>Jacob Mather</dc:creator>
		<pubDate>Mon, 29 Jun 2009 19:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.toao.net/?p=266#comment-923</guid>
		<description>Mango,

Great tips, however I would expand upon #10. Wrappers make life much easier and make the life of someone who wants to code properly much happier.

I use some very standard &#039;shortcode&#039; wrappers:

query($SQL) -- like yours in #10, as well as:
query_single($SQL) -- returns the first row
query_all($SQL) -- returns an array with all result rows
query_return($SQL) -- returns mysql_insert_id() so you can easily get the id of the item you inserted.
esc($string) -- shortcode for mysql_real_escape_string($string, $GLOBALS[&#039;db_handler&#039;])
he($string) -- htmlentities($string)
ue($string) -- urlencode($string)

I also use some simple systems for things like debug info and notices to users, but that&#039;s kinda past the point of this. :)</description>
		<content:encoded><![CDATA[<p>Mango,</p>
<p>Great tips, however I would expand upon #10. Wrappers make life much easier and make the life of someone who wants to code properly much happier.</p>
<p>I use some very standard 'shortcode' wrappers:</p>
<p>query($SQL) -- like yours in #10, as well as:<br />
query_single($SQL) -- returns the first row<br />
query_all($SQL) -- returns an array with all result rows<br />
query_return($SQL) -- returns mysql_insert_id() so you can easily get the id of the item you inserted.<br />
esc($string) -- shortcode for mysql_real_escape_string($string, $GLOBALS['db_handler'])<br />
he($string) -- htmlentities($string)<br />
ue($string) -- urlencode($string)</p>
<p>I also use some simple systems for things like debug info and notices to users, but that's kinda past the point of this. <img src='http://www.toao.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />&nbsp;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
