News Feed
Jobs Feed
Sections




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

MaltBlue.com:
ZendDbSqlSelect - The Basics (Columns, Limit & Order)
July 02, 2013 @ 09:53:32

Matthew Setter has posted the third part of his series looking at the Zend Framework 2's DbSqlSelect component and its use. In this latest (and last) tutorial, he talks more specifically about columns, limiting and ordering.

Welcome to the third and last part in this series, introducing you to working with the ZendDbSqlSelect classes in Zend Framework 2. In part one we looked at building SQL Where clauses using the where related functions, predicates and closures, as well as compound queries. In part 2, we looked at all forms of SQL joins as well as a slightly more esoteric feature of SQL - UNIONS. Here, in part 3, in the words of Coldplay, we're going back to the start, and looking at the fundamentals.

He looks at three specific elements - the class constructor, the "limit" and "order" functions and the "Expression" class. He includes sample code showing how to create the class - one normally and one bound to a specific table. The next example shows how to define the columns to be selected using the "select" method. Finally, he shows the use of the "Expression" objects to perform SQL operations in the query (like "COUNT").

0 comments voice your opinion now!
zendframework2 db sql select series part3 column limit order

Link: http://www.maltblue.com/tutorial/zend-db-sql-the-basics

blog comments powered by Disqus

Similar Posts

DevShed: Generating View from MySQL to Simulate the Model-View-Controller Schema in PHP

Tiger Heron Blog: First steps with PHP - booting a script, Part 1

PHPMaster.com: Managing Class Dependencies: Dependency Injection, Service Locators & Factories, Pt 2

NetTuts.com: Refactoring Legacy Code: Part 1 - The Golden Master

Hasin Hayder's Blog: Vulnerable bug in CodeIgniter which took us hours to fix our corrupted database


Community Events











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


symfony2 language framework install introduction composer component facebook hack example application package hhvm unittest security database podcast performance release project

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