<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 14:58:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[MaltBlue.com: Use RouteMatch in Zend Framework 2 For Easy Routing]]></title>
      <guid>http://www.phpdeveloper.org/news/19536</guid>
      <link>http://www.phpdeveloper.org/news/19536</link>
      <description><![CDATA[<p>
In the latest to his site <i>Matthew Setter</i> takes a look at <a href="http://www.maltblue.com/tutorial/use-zend-framework-2-routematch-for-dynamic-routing">easy routing with RouteMatch</a> in Zend Framework 2 applications. The <a href="http://framework.zend.com/apidoc/2.0/classes/Zend.Mvc.Router.Http.RouteMatch.html">RouteMatch</a> component gives you better control over your routing and lets you define "match paths" for URL to Controller mappings.
</p>
<blockquote>
Today using Zend Framework 2 RouteMatch, Router and Request objects, I show you an easy way to dynamically update the current route. It's almost painlessly simple. [...] Well, like most things in web application development, what starts out simply in the beginner often grows more complex over time. So too is my once simple route.
</blockquote>
<p>
His "simple" route started getting a bit out of control when he added in some pagination to the page (and query for the path match). He wanted to figure out how to re-render data with the same filters but show the next page of data. He shows how to use the RouteMatch component to achieve just this. He creates a custom module with a "listViewToolbar" helper that lets you read the router, request and handle the parameters sent via the URL. The "invoke" method is called to render the toolbar in the page, complete with the new settings.
</p>
Link: http://www.maltblue.com/tutorial/use-zend-framework-2-routematch-for-dynamic-routing]]></description>
      <pubDate>Thu, 02 May 2013 11:14:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Pagination with CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/17465</guid>
      <link>http://www.phpdeveloper.org/news/17465</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing you how to <a href="http://phpmaster.com/pagination-with-codeigniter/">handle simple pagination</a> in a popular PHP framework, <a href="http://codeigniter.com">CodeIgniter</a>.
</p>
<blockquote>
Pagination is particularly useful when you are coding an application that interfaces with a database. A large dataset might have hundreds of possible results for one query, and pagination creates a much nicer user experience. In this tutorial, I'll use CodeIgniter's pagination library to show you how you can create a paginated list of results from a MySQL database. Along the way, you'll also see how to fix a problem with the pagination links that the library might produce.
</blockquote>
<p>
He starts on the backend,  creating a model to work with Country information and includes a "fetch_countries" method to grab the limited/paged list. Next up is the controller with an "example1" method that looks to the URL to see what page it should be on. The view is simple enough - just outputting the results back without worrying about how many to show.
</p>]]></description>
      <pubDate>Mon, 30 Jan 2012 12:15:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Paging Data with the SQL Server Drivers for PHP: Simplified]]></title>
      <guid>http://www.phpdeveloper.org/news/15820</guid>
      <link>http://www.phpdeveloper.org/news/15820</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/01/26/paging-data-with-the-sql-server-drivers-for-php-simplified.aspx">simplified the pagination</a> using the SQL Server drivers for PHP in his latest post. He shows how to use a cursor to move around in the result set from your query.
</p>
<blockquote>
An oversimplified definition of a database cursor might be this: A cursor is database functionality that allows you to point to a certain location within a result set and allows you to move forward (and sometimes backward, depending upon the cursor type) through the result set one row at a time. [...] In the paging [scenario], I'll use a static cursor since that cursor type would seem to satisfy the requirements of many web-based applications.
</blockquote>
<p>
He shows how to execute a simple query with a dynamic cursor by specifying it in the connection call. He then uses the <a href="http://php.net/sqlsrv_num_rows">sqlsrv_num_rows</a> to find the number of records returned and a <a href="http://php.net/sqlsrv_fetch_array">sqlsrv_fetch_array</a> call to pull just the page you need. He also includes some handy code to paginate the results, complete with links.
</p>]]></description>
      <pubDate>Thu, 27 Jan 2011 12:54:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: How to Page Data with the SQL Server Drivers for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14834</guid>
      <link>http://www.phpdeveloper.org/news/14834</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/07/21/how-to-page-data-with-the-sql-server-drivers-for-php.aspx">a quick new post</a> today about using the pagination feature in the latest version of the SQL Server driver for PHP.
</p>
<blockquote>
So, with the final release of the <a href="http://blogs.msdn.com/b/sqlphp/archive/2010/06/29/an-update-on-our-ctp2-release.aspx">2.0 version of the driver coming soon</a>, I thought it was high time I posted something about using the functionality that was added in the v1.1 driver (better late then never!). While I'm at it, I'll include code that shows how to do paging with the PDO driver. (Complete scripts attached to this post.)
</blockquote>
<p>
He gives a basic example of paginated data that lets you move back and forth with simple text links on the page. The key is in the <a href="http://msdn.microsoft.com/en-us/library/ms186734.aspx">row_number</a> function that lets you specify the block of records to return. Code is included for this and a few other modifications including numeric links to jump to certain pages in the results. All scripts are <a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-10-04-10-90/paging_5F00_scripts.zip">included as a download</a>.
</p>]]></description>
      <pubDate>Thu, 22 Jul 2010 09:16:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Eli White's Blog: An intriguing use of lambda functions]]></title>
      <guid>http://www.phpdeveloper.org/news/14166</guid>
      <link>http://www.phpdeveloper.org/news/14166</link>
      <description><![CDATA[<p>
In a new post to his blog today <i>Eli White</i> takes a look at an <a href="http://eliw.wordpress.com/2010/03/10/an-intriguing-use-of-lambda-functions/">interesting use of lambda functions</a> he's figured out for a his <a href="http://goodsie.com/">development at work</a>.
</p>
<blockquote>
I found a very specific use out of the blue of Lambda functions that I have now used and I see as a great use-case. Which is specifically passing functions/logic from your Controller to your View. In the case of Goodsie, I'm using PHP for my templating language and as usual I'm trying to remove as much logic from my View as possible, while still allowing the view to be malleable.
</blockquote>
<p>
His method centered around a pagination subview that he wanted to make flexible enough to work with both the standard page view and with an ajax request. Lambda functions came to the rescue by dynamically creating a function based on the request need. 
</p>]]></description>
      <pubDate>Thu, 11 Mar 2010 08:48:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 2)]]></title>
      <guid>http://www.phpdeveloper.org/news/13771</guid>
      <link>http://www.phpdeveloper.org/news/13771</link>
      <description><![CDATA[<p>
The Zend Developer Zone has posted <a href="http://devzone.zend.com/article/11540-Paging-and-Sorting-Data-with-Zend-Framework-Doctrine-and-PEAR-part-2">the second part</a> of their look at pagination with the combination of the Zend Framework, Doctrine and PEAR and how the Zend_Paginator component compares to the PEAR and Doctrine alternatives.
</p>
<blockquote>
In the previous segment of this article, I introduced you to the Zend_Paginator class, which provides a flexible API for paginating any data collection, whether it is expressed as an array or a database result set. [...] This article will explore two such alternatives, the PEAR Pager class and the Doctrine Pager class, and give you a crash course in how you can use them to quickly add paging and sorting features to your PHP application.
</blockquote>
<p>
<a href="http://devzone.zend.com/article/11540-Paging-and-Sorting-Data-with-Zend-Framework-Doctrine-and-PEAR-part-2">The article</a> gives examples for both of the other methods - a simple pagination of database information with the PEAR pager component (and other packages that can make the results more effective) and the creation of a Doctrine instance where the results are handled via a series of built-in method calls.
</p>]]></description>
      <pubDate>Mon, 04 Jan 2010 11:52:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PaperMashup.com: Easy PHP Pagination]]></title>
      <guid>http://www.phpdeveloper.org/news/13714</guid>
      <link>http://www.phpdeveloper.org/news/13714</link>
      <description><![CDATA[<p>
In a new post to <i>Ashley Ford</i>'s blog there's <a href="http://papermashup.com/easy-php-pagination/">a tutorial</a> on paginating your data (from an array of data pulled from a database) with a simple PHP script:
</p>
<blockquote>
I've had a few pagination scripts over the years but I thought i'd share the one that i'm currently using as it's a useful script to have in your toolbox. As a developer you'll soon find a need to paginate data when displaying contents from the database, and rather than use JavaScript which could require all the data to be loaded into the page on load, we can use PHP to ensure that we're only requesting the data that we need from the database.
</blockquote>
<p>
Some sample code is included showing how to use the LIMIT statement (there's similar features in the other major databases) to only pull a subset of the data needed back into your script. Some CSS is also included to make it all look a bit. You can see it in action <a href="http://papermashup.com/demos/php-pagination/">here</a> and download the source <a href="http://papermashup.com/demos/php-pagination/php-pagination.zip">here</a>.
</p>]]></description>
      <pubDate>Tue, 22 Dec 2009 10:38:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/13661</guid>
      <link>http://www.phpdeveloper.org/news/13661</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's <a href="http://devzone.zend.com/article/11462-Paging-and-Sorting-Data-with-Zend-Framework-Doctrine-and-PEAR-part-1">the first part of a series</a> looking at pagination and sorting of data with the combination of the Zend Framework, Doctrine and PEAR.
</p>
<blockquote>
When building database-backed applications, one of the important problems for a developer or user interface engineer involves making large data sets more manageable by, and therefore more useful to, application users. [...] Back in the good old days, adding pagination to a PHP application was mostly a manual task, involving offset calculations and custom query generation. In recent years, the task has become significantly simpler, mostly due to the presence of ready-made pagination components in most common frameworks.
</blockquote>
<p>
His tutorial uses the Zend Framework, Doctrine and the Pager, MDB2 and Structures_Datagrid PEAR packages. He starts with a basic select and format kind of example to show a few lines per page. To improve it (for larger data sets) he shows how to use the Zend_Paginator to only grab the rows needed for the page. Finally, he adds in code to allow for column sorting, making it easy to reorganize the results how you'd like.
</p>]]></description>
      <pubDate>Fri, 11 Dec 2009 09:43:29 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Aext.net: CodeIgniter and jQuery - Real Live Search with Pagination]]></title>
      <guid>http://www.phpdeveloper.org/news/13413</guid>
      <link>http://www.phpdeveloper.org/news/13413</link>
      <description><![CDATA[<p>
On the Aext.net website there's been a <a href="http://aext.net/2009/10/codeigniter-and-jquery-real-live-search-with-pagination/">recent tutorial</a> looking at pagination in a <a href="http://codeigniter.com">CodeIgniter</a> application using the jQuery Javascript library.
</p>
<blockquote>
In this tutorial, we will create a search page with CodeIgniter and jQuery. We're not gonna create only a default search page using CodeIgniter framework, but also a real time search with jQuery's support. And one more, enable GET method in CodeIginter that was stupidly disable by default.
</blockquote>
<p>
You'll need to already have CodeIgniter installed and have some sample data you want to paginate. They take you from there, though - configuring the framework, altering your database table and creating each of the MVC parts to make the pagination work. Toss in a bit of jQuery-based Javascript and you'll get <a href="http://aext.net/example/codeigniter/search">something like this</a>.
</p>]]></description>
      <pubDate>Tue, 20 Oct 2009 12:33:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com CodeIgniter from Scratch Day 7: Pagination]]></title>
      <guid>http://www.phpdeveloper.org/news/13322</guid>
      <link>http://www.phpdeveloper.org/news/13322</link>
      <description><![CDATA[<p>
On NETTUTS.com today they've posted <a href="http://net.tutsplus.com/videos/screencasts/codeigniter-from-scratch-day-7-pagination/">part seven</a> of their "CodeIgniter from Scratch" series of screencasts looking at building a CodeIgniter application from the ground up. This time the focus is on pagination.
</p>
<blockquote>
In these last two weeks, I've received bunches of requests for a CodeIgniter pagination screencast; so that's what we'll be reviewing today! As a bonus, we'll also take a look at the super convenient HTML Table class. 
</blockquote>
<p>
They show how to use a local setup (MAMP) to set up a CodeIgniter instance that pulls the data in and splits it out into multiple pages. Their paginated data comes out of a MySQL database.
</p>]]></description>
      <pubDate>Fri, 02 Oct 2009 07:51:40 -0500</pubDate>
    </item>
  </channel>
</rss>
