<?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: Code Igniter Query</title>
	<atom:link href="http://www.icpep.org/code-igniter-query/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icpep.org/code-igniter-query/</link>
	<description>Just another techie stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 07:01:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: paparts</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-6120</link>
		<dc:creator>paparts</dc:creator>
		<pubDate>Mon, 03 Oct 2011 21:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-6120</guid>
		<description>You can load the model at the constructor by using $this-&gt;load-&gt;model(&#039;Mydb&#039;);</description>
		<content:encoded><![CDATA[<p>You can load the model at the constructor by using $this-&gt;load-&gt;model(&#8216;Mydb&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: milson</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-6119</link>
		<dc:creator>milson</dc:creator>
		<pubDate>Mon, 03 Oct 2011 16:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-6119</guid>
		<description>how about for the controller?</description>
		<content:encoded><![CDATA[<p>how about for the controller?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Destreyf</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-5579</link>
		<dc:creator>Destreyf</dc:creator>
		<pubDate>Fri, 04 Mar 2011 00:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-5579</guid>
		<description>There&#039;s an even easier way to perform query returns like that, you don&#039;t even have to loop the result for your return, you would simply do the following:

db-&gt;where(&#039;number&#039;,1)-&gt;get(&#039;tablename&#039;)-&gt;result();
    }
}
?&gt;


the above code returns the result array, which can then be used, without re-assigning it to another variable, this allows quick, simple, storage and dumping of data, from a function, returning without the -&gt;result() can even return the object itself to be operated on directly, such as calculation of rows, ect, but you can also, for obtaining rows, do a count($returned_result) and get the same information.  Codeigniter makes the best use of existing functions and integration with great modern day programming practices.</description>
		<content:encoded><![CDATA[<p>There&#8217;s an even easier way to perform query returns like that, you don&#8217;t even have to loop the result for your return, you would simply do the following:</p>
<p>db-&gt;where(&#8216;number&#8217;,1)-&gt;get(&#8216;tablename&#8217;)-&gt;result();<br />
    }<br />
}<br />
?&gt;</p>
<p>the above code returns the result array, which can then be used, without re-assigning it to another variable, this allows quick, simple, storage and dumping of data, from a function, returning without the -&gt;result() can even return the object itself to be operated on directly, such as calculation of rows, ect, but you can also, for obtaining rows, do a count($returned_result) and get the same information.  Codeigniter makes the best use of existing functions and integration with great modern day programming practices.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adisak</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-5048</link>
		<dc:creator>adisak</dc:creator>
		<pubDate>Tue, 02 Nov 2010 04:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-5048</guid>
		<description>in controllers writer ?

if in model 

db-&gt;select(&#039;title,content&#039;); #where title and content are fields
		$sql = $this-&gt;db-&gt;get(&#039;data&#039;);  #data is a database table
		if($sql-&gt;num_rows() &gt; 0) {
			foreach($sql-&gt;result() as $row) {
				$data[] = $row;
			}
			return $data;
		}
        }
}
?&gt;</description>
		<content:encoded><![CDATA[<p>in controllers writer ?</p>
<p>if in model </p>
<p>db-&gt;select(&#8216;title,content&#8217;); #where title and content are fields<br />
		$sql = $this-&gt;db-&gt;get(&#8216;data&#8217;);  #data is a database table<br />
		if($sql-&gt;num_rows() &gt; 0) {<br />
			foreach($sql-&gt;result() as $row) {<br />
				$data[] = $row;<br />
			}<br />
			return $data;<br />
		}<br />
        }<br />
}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paparts</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-4695</link>
		<dc:creator>paparts</dc:creator>
		<pubDate>Fri, 09 Apr 2010 11:47:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-4695</guid>
		<description>Glad it helped...</description>
		<content:encoded><![CDATA[<p>Glad it helped&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jankit</title>
		<link>http://www.icpep.org/code-igniter-query/comment-page-1/#comment-4694</link>
		<dc:creator>Jankit</dc:creator>
		<pubDate>Fri, 09 Apr 2010 09:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.icpep.org/?p=869#comment-4694</guid>
		<description>Very good information. Thank you very much</description>
		<content:encoded><![CDATA[<p>Very good information. Thank you very much</p>
]]></content:encoded>
	</item>
</channel>
</rss>

