 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
DevShed: Paginating Database Records with the Code Igniter PHP Framework
by Chris Cornutt August 28, 2008 @ 07:57:51
DevShed continues their look at using the CodeIginiter PHP framework to build a sample application in this latest part of their series - a look a paginating the database results from a query.
As you may guess, however, Code Igniter comes bundled with a robust set of core classes, which can be used to perform all sorts of clever tasks, such as working with databases, performing file uploads, validating user-supplied data, and so forth. [...] I'm going to show you how to improve the MySQL-driven application developed in the preceding tutorial, since it'll be provided with the capacity for paging database records, via the pager class included with Code Igniter.
He starts by reviewing the previous part of the series, pulling the data from MySQL, then shows how to push that through the pagination component to create a simple user listing.
voice your opinion now!
codeigniter framework database mysql result query paginate
Arnold Daniels' Blog: An alternative way of EAV modeling
by Chris Cornutt July 31, 2008 @ 12:54:23
Arnold Daniels has posted some thoughts on a topics recently featured in a cover story by php|architect - EAV modeling.
I had seen this db structure in other project, but didn't know that it was called EAV. For those who don't read php|architect, EAV describes a method of saving a large set of attributes, only some of which apply to an individual entity. Normally you would create a table, with a row for each entity and save each attribute in a column. With EAV you save each attribute as a row.
He suggests two ways to do the modeling - the more "common" way and an alternative way that splits up the data types to make querying simpler (into scalars and arrays). A sample database structure and example query for it are included.
voice your opinion now!
eav modeling database attribute query common alternative method
Rob Allen's Blog: Notes on Zend_Cache
by Chris Cornutt July 11, 2008 @ 07:58:43
Rob Allen has posted a few notes about the Zend_Cache component of the Zend Framework to his blog today.
Recently I needed to speed up a legacy project that makes a lot of database calls to generate each page. After profiling, I discovered that 90% of the database calls returned data that rarely changed, so decided to cache these calls. One of the nice things about Zend_Framework is that its use-at-will philosophy means that you can use any given component with minimal dependencies on the rest of the framework code.
He shows how, using the Zend_Cache module (and friends Zend_Loader and Zend_Exception), he creates a caching class that can be called anywhere and is used to cache the results from the queries. His default lifetime is set to 7200 seconds - two hours - before the script needs to refresh the cache and get the latest updates.
voice your opinion now!
zendcache zendframework sql query results example code
Mike Willbanks' Blog: PHP Performance Series Maximizing Your MySQL Database
by Chris Cornutt June 19, 2008 @ 12:01:24
Mike Willbanks has posted another part in his "PHP performance" series today. In his previous article, he talked about caching techniques including things like opcode caching and database memory tables. This time he talks about getting the most out of your MySQL database.
Application level SQL performance is much different than the performance of the SQL query itself but rather how it has been designed to work in the application. Many of the items I will be addressing in this area is designing your application to make less queries thus improving scalability and likely performance. However, performance does not always equal scalability as the same with scalability does not always equal performance.
He looks at a few different topics like lazy connections, iterating queries, need-based selects, normalization and a few simple things that you can apply to every SQL your application uses to optimize it as much as possible.
voice your opinion now!
performance series maximize mysql database tip sql query
PHPBuilder.com.au: Executing queries with phpMyAdmin
by Chris Cornutt May 02, 2008 @ 11:18:36
PHPBuilder.com.au continues their look at using phpMyAdmin in this new part of the series today. This new article focuses on using the interface to make queries against the data in your tables.
The previous article gave you an overview of the phpMyAdmin interface and functionality. It's now time to dive in further and learn how to construct and execute queries.
They show (complete with screenshots) how to use the GUI to build the different parts of your query - a simple SELECT statement with a join pulling together the customer information and their addresses.
voice your opinion now!
phpmyadmin screenshot tutorial build query
|
Community Events
Don't see your event here? Let us know!
|