News Feed
Sections




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

SitePoint PHP Blog:
PINQ - querify your datasets - introduction
August 21, 2014 @ 09:20:19

The SitePoint PHP blog has posted the first part of a new series they're releasing about querying your data with Pinq. It's a PHP-based query tool that provides a fluent interface for searching and traversing your data. In this first post of the series Taylor Ren introduces you to the library and shows some basic usage.

You may have heard of LINQ (Language-Integrated Query), a "set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic". It provides necessary interfaces and syntax to perform various queries on a given dataset so that operations like filtering, sorting, grouping, aggregating, etc can be performed. PINQ (PHP Integrated Query) is "based off the .NET's Linq, and unifies querying across arrays/iterators and external data sources, in a single readable and concise fluent API".

He talks about normal searching (equals matching) and "faceted searching", narrowing down the results piece by piece until you find what you need. He gives an example with some sample database data and shows the results of a simple query with a price filter and grouped by author. He includes the code to make it happen (inside a simple Silex application) too. He then takes a deeper look at the LINQ queries and how related statements are handled.

0 comments voice your opinion now!
linq pinq query dataset tutorial introduction series part1

Link: http://www.sitepoint.com/pinq-querify-datasets-introduction/

blog comments powered by Disqus

Similar Posts

DevShed: Working with Private Properties to Protect PHP 5 Class Data

Stefan Mischook's Blog: Creating Custom PHP Functions Video Tutorial - Part 3

RoofTopSolutions.nl: Caching in PHP using the filesystem, APC, and Memecached

NetTuts.com: Mockery: A Better Way

Master Zend Framework: Using Sessions In Zend Framework 2 - Part 1


Community Events





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


laravel symfony list deployment community podcast zendserver series library voicesoftheelephpant introduction conference interview bugfix api release language framework developer tips

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