News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso's Blog:
Populating datagrid techniques with PHP
July 19, 2011 @ 09:25:46

In a new post to his blog Gonzalo Ayuso looks at the code required to populate a jQuery data grid with the records as pulled from a (MySQL) database.

Today I want to speak about populating datagrid techniques with PHP. At least in my daily work datagrids and tabular data are very common, because of that I want to show two different techniques when populating datagrids with data from our database. Maybe it's obvious, but I want to show the differences.

He uses "old school spaghetti code" rather than a framework to keep things simple and pulls the data from the database with a PDO connection. This information is then manually pushed into an HTML table and the data grid functionality is applied to it. The other method involves a little bit of JSON magic that the data grid library pulls in and populates for you, still appending rows to a table.

He notes that the second method seems faster to the user since the page and table are rendered first, but it also comes at the cost of more than one HTTP request.

0 comments voice your opinion now!
datagrid jquery technique preload ajax json


blog comments powered by Disqus

Similar Posts

Jim Plush\'s Blog: The End of alert() - MyBic 0.6.2 AJAX Released

Daniel Krook's Blog: NYPHP Conference & Expo 2006

Community News: Pyxy-Gallery, PHP & Ajax-enhanced Image Gallery

Spindrop.us: Digg-style AJAX comment editing in PHP/symfony

PHP-it.net: Creating a chat script with PHP and Ajax (Part 2)


Community Events

Don't see your event here?
Let us know!


interview framework language xdebug extension voicesoftheelephpant podcast example laravel laravel5 release api install introduction series unittest community opinion php7 library

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework