<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Guru Code Snippets</title>
	<atom:link href="http://gurucode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gurucode.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 21 Nov 2011 09:27:43 +0000</lastBuildDate>
	<language>ca</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gurucode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Guru Code Snippets</title>
		<link>http://gurucode.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gurucode.wordpress.com/osd.xml" title="Guru Code Snippets" />
	<atom:link rel='hub' href='http://gurucode.wordpress.com/?pushpress=hub'/>
		<item>
		<title>deb_fetch_var</title>
		<link>http://gurucode.wordpress.com/2008/08/22/deb_fetch_var/</link>
		<comments>http://gurucode.wordpress.com/2008/08/22/deb_fetch_var/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 10:16:59 +0000</pubDate>
		<dc:creator>gurucode</dc:creator>
				<category><![CDATA[db connection: MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://gurucode.wordpress.com/?p=9</guid>
		<description><![CDATA[/** * db_fetch_var * Devuelve un array de un fetch con todos los valores del registro buscados * * @param resource $rResource * @param array &#124; string $asField * @return array */ function db_fetch_var( $rResource, $asField=&#8221; ) { if( empty($asField)) { return mysql_fetch_row( $rResource ); } else if( is_array($asField)) { $a = array(); $rw = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gurucode.wordpress.com&amp;blog=4581970&amp;post=9&amp;subd=gurucode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<hr />/**<br />
* <strong><big>db_fetch_var</big></strong><br />
* Devuelve un array de un fetch con todos los valores del registro buscados<br />
*<br />
* @param resource $rResource<br />
* @param array | string $asField<br />
* @return array<br />
*/<br />
<span style="color:#0000ff;">function </span>db_fetch_var( $rResource, $asField=&#8221; )<br />
{</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">if</span>( empty($asField))<br />
{</p>
<p style="padding-left:60px;"><span style="color:#0000ff;">return </span>mysql_fetch_row( $rResource );</p>
<p style="padding-left:30px;">}<br />
else if( is_array($asField))<br />
{</p>
<p style="padding-left:60px;">$a = array();<br />
$rw = mysql_fetch_array( $rResource, MYSQL_ASSOC );<br />
foreach ($asField as $sValue)<br />
{</p>
<p style="padding-left:90px;">$a[] = $rw[$sValue];</p>
<p style="padding-left:60px;">}<br />
return $a;</p>
<p style="padding-left:30px;">}<br />
else<br />
{</p>
<p style="padding-left:60px;">$a = array();<br />
$rw = mysql_fetch_array( $rResource,         MYSQL_ASSOC );<br />
$a[] = $rw[$asField];<br />
return $a;</p>
<p style="padding-left:30px;">}</p>
<p>}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gurucode.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gurucode.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gurucode.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gurucode.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gurucode.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gurucode.wordpress.com&amp;blog=4581970&amp;post=9&amp;subd=gurucode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gurucode.wordpress.com/2008/08/22/deb_fetch_var/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd971a4fda99ab40589000a657ad4e10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gurucode</media:title>
		</media:content>
	</item>
		<item>
		<title>is_open</title>
		<link>http://gurucode.wordpress.com/2008/08/22/is_open/</link>
		<comments>http://gurucode.wordpress.com/2008/08/22/is_open/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 07:48:13 +0000</pubDate>
		<dc:creator>gurucode</dc:creator>
				<category><![CDATA[db connection: MySQL]]></category>

		<guid isPermaLink="false">http://gurucode.wordpress.com/?p=3</guid>
		<description><![CDATA[/** * is_open * Indica si la base de dades esta oberta o no * * @return bool true si esta oberta o false si esta tancada */ function is_open( $hDb ) { return is_resource($hDb ); }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gurucode.wordpress.com&amp;blog=4581970&amp;post=3&amp;subd=gurucode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#808080;">/**<br />
* <strong><big>is_open</big></strong><br />
* Indica si la base de dades esta oberta o no<br />
*<br />
* @return bool true si esta oberta o false si esta tancada<br />
*/</span><br />
<span style="color:#0000ff;">function </span><strong><span style="color:#800000;">is_open</span></strong>( $hDb )<br />
{<br />
<span style="color:#0000ff;">return </span><span style="color:#993366;">is_resource</span>($hDb );<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gurucode.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gurucode.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gurucode.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gurucode.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gurucode.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gurucode.wordpress.com&amp;blog=4581970&amp;post=3&amp;subd=gurucode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gurucode.wordpress.com/2008/08/22/is_open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd971a4fda99ab40589000a657ad4e10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gurucode</media:title>
		</media:content>
	</item>
	</channel>
</rss>
