<?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>The Tutorial Blog &#187; cakephp</title>
	<atom:link href="http://www.thetutorialblog.com/tag/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thetutorialblog.com</link>
	<description></description>
	<lastBuildDate>Tue, 08 Nov 2011 19:21:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
<link>http://www.thetutorialblog.com</link>
<url>http://www.thetutorialblog.com/wp-content/plugins/maxblogpress-favicon/icons/favicon-28.ico</url>
<title>The Tutorial Blog</title>
</image>
		<item>
		<title>5 PHP Frameworks you may not know about</title>
		<link>http://www.thetutorialblog.com/php/5-php-frameworks-you-may-not-know-about/</link>
		<comments>http://www.thetutorialblog.com/php/5-php-frameworks-you-may-not-know-about/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 14:55:30 +0000</pubDate>
		<dc:creator>Wez Pyke</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[akelos]]></category>
		<category><![CDATA[akelos php framework]]></category>
		<category><![CDATA[auth module]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[DB Objects]]></category>
		<category><![CDATA[framework tutorial]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[mutiple databases]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[php framework tutorial]]></category>
		<category><![CDATA[php frameworks]]></category>
		<category><![CDATA[php on trax]]></category>
		<category><![CDATA[php on trax framework]]></category>
		<category><![CDATA[php4]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[PRADO]]></category>
		<category><![CDATA[PRADO php framework]]></category>
		<category><![CDATA[seagull]]></category>
		<category><![CDATA[seagull php framework]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[yii]]></category>
		<category><![CDATA[yii php framework]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.thetutorialblog.com/?p=263</guid>
		<description><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	There are many PHP frameworks available for developers to choose from when creating a project. Frameworks such as CodeIgniter, CakePHP, Symfony and Zend are the most popular frameworks used by developers. In this article I will compile a list of 5 frameworks that many developers may not know of. Seagull Supports: PHP4 PHP5 Multiple Database's [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2F5-php-frameworks-you-may-not-know-about%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2F5-php-frameworks-you-may-not-know-about%2F&amp;source=wezpyke&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="5 PHP Frameworks you may not know about" alt=" 5 PHP Frameworks you may not know about" /><br />
			</a>
		</div>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/php_logo.jpg" alt="php logo 5 PHP Frameworks you may not know about" title="php_logo" width="328" height="230" class="alignleft size-full wp-image-280" /><br />
There are many PHP frameworks available for developers to choose from when creating a project. Frameworks such as <a href="http://codeigniter.com">CodeIgniter</a>, <a href="http://www.cakephp.org">CakePHP</a>, <a href="http://www.symfony-project.org/">Symfony</a> and <a href="http://framework.zend.com/">Zend</a> are the most popular frameworks used by developers.</p>
<p>In this article I will compile a list of 5 frameworks that many developers may not know of.<br />
<span id="more-263"></span></p>
<h2><a href="http://seagullproject.org/">Seagull</a></h2>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/Seagull.jpg" alt="Seagull 5 PHP Frameworks you may not know about" title="Seagull" width="300" height="75" class="alignleft size-full wp-image-275" /><br />
Supports:</p>
<ul>
<li>PHP4</li>
<li>PHP5</li>
<li>Multiple Database's</li>
<li>ORM</li>
<li>DB Objects</li>
<li>Templates</li>
<li>Caching</li>
<li>Validation</li>
<li>Ajax</li>
<li>Auth Module</li>
<li>Modules</li>
</ul>
<h2><a href="http://www.phpontrax.com/">PHP on TRAX</a></h2>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/phpontrax.jpg" alt="phpontrax 5 PHP Frameworks you may not know about" title="phpontrax" width="187" height="194" class="alignleft size-full wp-image-277" /><br />
Supports:</p>
<ul>
<li>PHP5</li>
<li>Multiple Database's</li>
<li>ORM</li>
<li>DB Objects</li>
<li>Validation</li>
<li>Ajax</li>
<li>Modules</li>
</ul>
<h2><a href="http://www.yiiframework.com/">Yii</a></h2>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/Yii.jpg" alt="Yii 5 PHP Frameworks you may not know about" title="Yii" width="430" height="55" class="alignleft size-full wp-image-278" /><br />
Supports:</p>
<ul>
<li>PHP5</li>
<li>Multiple Database's</li>
<li>ORM</li>
<li>DB Objects</li>
<li>Templates</li>
<li>Caching</li>
<li>Validation</li>
<li>Ajax</li>
<li>Auth Module</li>
<li>Modules</li>
</ul>
<h2><a href="http://www.akelos.org/">Akelos</a></h2>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/Akelos.jpg" alt="Akelos 5 PHP Frameworks you may not know about" title="Akelos" width="225" height="115" class="alignleft size-full wp-image-279" /><br />
Supports:</p>
<ul>
<li>PHP4</li>
<li>PHP5</li>
<li>Multiple Database's</li>
<li>ORM</li>
<li>DB Objects</li>
<li>Templates</li>
<li>Caching</li>
<li>Validation</li>
<li>Ajax</li>
<li>Auth Module</li>
<li>Modules</li>
</ul>
<h2><a href="http://www.pradosoft.com/">Prado</a></h2>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2010/02/PRADO.jpg" alt="PRADO 5 PHP Frameworks you may not know about" title="PRADO" width="540" height="50" class="alignleft size-full wp-image-276" /><br />
Supports:</p>
<ul>
<li>PHP5</li>
<li>Multiple Database's</li>
<li>ORM</li>
<li>DB Objects</li>
<li>Templates</li>
<li>Caching</li>
<li>Validation</li>
<li>Ajax</li>
<li>Auth Module</li>
<li>Modules</li>
</ul>
<h2>Other frameworks</h2>
<p>If there are other frameworks that you know of that you think I have missed then please feel free to post a comment.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.thetutorialblog.com/php/5-php-frameworks-you-may-not-know-about/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Twitter-like pagination using CakePHP and jQuery</title>
		<link>http://www.thetutorialblog.com/php/twitter-like-pagination-using-cakephp-and-jquery/</link>
		<comments>http://www.thetutorialblog.com/php/twitter-like-pagination-using-cakephp-and-jquery/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 00:26:26 +0000</pubDate>
		<dc:creator>Wez Pyke</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Text Tutorials]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wez pyke]]></category>

		<guid isPermaLink="false">http://www.thetutorialblog.com/?p=179</guid>
		<description><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	I have already done this tutorial with CodeIgniter and jQuery it can be found here. I thought I would do this tutorial again but rewrite it for CakePHP because it is a popular PHP framework. Before we start doing any PHP code make sure to copy in the code below into your MySQL database. CREATE [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2Ftwitter-like-pagination-using-cakephp-and-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2Ftwitter-like-pagination-using-cakephp-and-jquery%2F&amp;source=wezpyke&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Twitter like pagination using CakePHP and jQuery" alt=" Twitter like pagination using CakePHP and jQuery" /><br />
			</a>
		</div>
<p><img src="http://www.thetutorialblog.com/wp-content/uploads/2009/12/twitter_pagination_icon.jpg" alt="twitter pagination icon Twitter like pagination using CakePHP and jQuery" title="twitter_pagination_icon" width="300" height="300" class="alignleft size-full wp-image-168" />I have already done this tutorial with CodeIgniter and jQuery it can be found <a href="http://www.thetutorialblog.com/php/twitter-like-pagination-using-codeigniter-and-jquery/">here</a>. I thought I would do this tutorial again but rewrite it for CakePHP because it is a popular PHP framework.</p>
<p>Before we start doing any PHP code make sure to copy in the code below into your MySQL database.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span>  <span style="color: #ff0000;">`tutorials`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`twitter_messages`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> INT <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`username`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">30</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`message`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">140</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #66cc66;">&#41;</span> ENGINE <span style="color: #66cc66;">=</span> INNODB</pre></div></div>

<h2>Create the controller</h2>
<p>Under the folder named controller create a file and call it twitter_controller.php.</p>
<p>We create a class inside it called TwitterController and it will extend AppController. We then set the name of the controller to twitter and tell CakePHP which table we are using in our database.<br />
<span id="more-179"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> TwitterController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'twitter_messages'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;</span>pre<span style="color: #339933;">&gt;</span>
&nbsp;
In this controller we will have two methods index and get_messages<span style="color: #339933;">.</span> Our index method will have no parameters and get_messages will have one parameter so that we know what the offset of the <span style="color: #990000;">current</span> number of messages loaded<span style="color: #339933;">.</span>
&nbsp;
Inside our index method we will retrieve the number of messages in the table and also the first <span style="color: #cc66cc;">10</span> records<span style="color: #339933;">.</span>
&nbsp;
<span style="color: #339933;">&lt;</span>pre lang<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;php&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #000000; font-weight: bold;">function</span> index<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'num_messages'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twitter_messages</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">num_messages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'messages'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twitter_messages</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_messages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In our second method called get_messages we grab the 10 latest messages for when it is called via jQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_messages<span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'latest_messages'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twitter_messages</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_messages</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Model</h2>
<p>Under the models folder create a file and name it twitter_messages.php.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Twitter_messages <span style="color: #000000; font-weight: bold;">extends</span> AppModel <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'twitter_messages'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> get_messages<span style="color: #009900;">&#40;</span><span style="color: #000088;">$offset</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$messages</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'all'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'offset'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$offset</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'limit'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$messages</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> num_messages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'count'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>These two methods in the model are called from the controller.</p>
<h2>View</h2>
<p>Create a folder called twitter inside the views folder. Then create a file called index.ctp and get_messages.ctp.</p>
<h3>index.ctp</h3>
<p>Inside the index file copy this css and jQuery code.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;style&gt;
#main_content {
	border: #999 1px solid;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	padding: 5px;
}
&nbsp;
#more_button {
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	color: #990000;
	text-align: center;
	padding: 5px;
	background-color: #fff;
	background-image: url(&quot;http://s.twimg.com/a/1261078355/images/more.gif&quot;);
	background-repeat: repeat-x;
	cursor: pointer;
	border: 1px solid #AAA;
}
&nbsp;
#more_button:hover {
	border:1px solid #bbb;
	text-decoration:none;
	background-position:left -78px;
}
&lt;/style&gt;
&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
&lt;/script&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
		$(document).ready(function(){
		var num_messages = &lt;?=$num_messages?&gt;;
		var loaded_messages = 0;
			$(&quot;#more_button&quot;).click(function(){
				loaded_messages += 10;
				$.get(&quot;twitter/get_messages/&quot; + loaded_messages, function(data){
					$(&quot;#main_content&quot;).append(data);
&nbsp;
				});
&nbsp;
				if(loaded_messages &gt;= num_messages - 10)
				{
					$(&quot;#more_button&quot;).hide();
					//alert('hide');
				}
			})
		})
	&lt;/script&gt;</pre></div></div>

<p>Below this copy in the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;main_content&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$messages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter_messages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' - '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter_messages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&nbsp;
&lt;div id=&quot;more_button&quot;&gt;
	more
&lt;/div&gt;</pre></div></div>

<p>Here we are displaying the first 10 records in the database then when the more button is clicked an ajax request will retrieve 10 more.</p>
<h3>get_messages.ctp</h3>
<p>This file is the file that is called upon the ajax request. This will display the 10 latest retrieve records.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$latest_messages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter_messages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' - '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$message</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter_messages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>Final words</h2>
<p>I hope this tutorial has been useful to you, please Retweet it if it was useful for you. You can also follow me <a href="http://twitter.com/wezpyke">@wezpyke</a></p>
<h2>Download</h2>
<p><a href="http://bit.ly/91Rptr">Download the resources for this tutorial</a></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.thetutorialblog.com/php/twitter-like-pagination-using-cakephp-and-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 CakePHP Tutorials You Should Read</title>
		<link>http://www.thetutorialblog.com/general/5-cakephp-tutorials-you-should-read/</link>
		<comments>http://www.thetutorialblog.com/general/5-cakephp-tutorials-you-should-read/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 23:25:05 +0000</pubDate>
		<dc:creator>Wez Pyke</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakephp 1.2]]></category>
		<category><![CDATA[cakephp theme]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[controllers]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[image upload]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[mvc pattern]]></category>
		<category><![CDATA[page titles]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[scriptaculous]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[theming]]></category>
		<category><![CDATA[uploader plugin]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[views]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.thetutorialblog.com/?p=87</guid>
		<description><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	There are a number of frameworks available for PHP such as CodeIgnitor, Zend, Symfony, Kohana and many more. In this article you will find tutorials that I have found on the web that will help PHP programmers that are new to the MVC pattern or CakePHP. CakePHP is an amazing framework if you know how [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fgeneral%2F5-cakephp-tutorials-you-should-read%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fgeneral%2F5-cakephp-tutorials-you-should-read%2F&amp;source=wezpyke&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="10 CakePHP Tutorials You Should Read" alt=" 10 CakePHP Tutorials You Should Read" /><br />
			</a>
		</div>
<p><img class="alignleft size-full wp-image-88" title="cake-logo" src="http://www.thetutorialblog.com/wp-content/uploads/2009/07/cake-logo.png" alt="cake logo 10 CakePHP Tutorials You Should Read" width="180" height="180" />There are a number of frameworks available for <a href="http://www.php.net">PHP</a> such as <a href="http://codeigniter.com/" target="_blank">CodeIgnitor</a>, <a href="http://framework.zend.com/" target="_blank">Zend</a>, <a href="http://www.symfony-project.org/" target="_blank">Symfony</a>, <a href="http://www.kohanaphp.com/" target="_blank">Kohana</a> and many more. In this article you will find tutorials that I have found on the web that will help PHP programmers that are new to the <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">MVC pattern</a> or <a href="http://www.cakephp.org">CakePHP</a>.</p>
<p>CakePHP is an amazing framework if you know how to use it, but the documentation for CakePHP is quite badly written and can cause confusion for new users. Here are a few links to try and make life easier for new and experienced CakePHP users.</p>
<ol>
<li><a href="http://cakebaker.42dh.com/2007/01/03/validation-with-cakephp-12/" target="_blank">Validation with CakePHP</a></li>
<li><a href="http://www.pseudocoder.com/archives/2008/01/07/theming-with-cakephp/" target="_blank">Theming with CakePHP</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/getting-started-quickly-with-scriptaculous-effects" target="_blank">Getting started quickly with Scriptaculous effects</a></li>
<li><a href="http://dieter.plaetinck.be/drag_n_drop_tutorial_with_cakephp_ajax_prototype_scriptaculous" target="_blank">Drag 'n drop tutorial with the CakePHP 1.2 Ajax helper, Prototype framework and Scriptaculous library</a></li>
<li><a href="http://labs.iamkoa.net/2007/11/08/secure-cakephp-via-sessions-login-logout/" target="_blank">Secure CakePHP via Sessions &amp; Magic (Login / Logout)</a></li>
<li><a href="http://aranworld.com/article/161/cakephp-acl-tutorial-what-is-it" target="_blank">CakePHP ACL Tutorial</a></li>
<li><a href="http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/" target="_blank">CakePHP Bake - Baking Models, Controllers and Views the CakePHP 1.2 Way</a></li>
<li><a href="http://jamienay.com/blog/featured/cascading-dynamic-meta-tags-and-page-titles-in-cakephp-12/" target="_blank">Cascading Dynamic Meta Tags and Page Titles in CakePHP 1.2</a></li>
<li><a href="http://bakery.cakephp.org/articles/view/jquery-image-upload-crop" target="_blank">jQuery image upload &amp; crop</a></li>
<li><a href="http://www.milesj.me/resources/script/uploader-plugin" target="_blank">Uploader - Plugin</a></li>
</ol>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.thetutorialblog.com/general/5-cakephp-tutorials-you-should-read/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

