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

Brian Swan's Blog:
Sorting Azure Table Entities by Timestamp with PHP
April 27, 2011 @ 10:48:17

Brian Swan has a quick new post to his blog for the PHP + Azure users out there on how to easily sort table entities by a timestamp through the Azure SDK for PHP. The timestamp is a property on the parent storage table class, so you don't need to create it in your entity, it's already there.

The problem boils down to sorting an array of objects by a timestamp property, so the information here is nothing that hasn't been done before. However, after spending some time looking for a way to use a filter in the Windows Azure SDK for PHP API, I didn't find one, so I'm hoping this post might save others some time. In the end, my solution simply uses the PHP array_multisort function.

Sample code is included - a basic class extending Microsoft_WindowsAzure_Storage_TableEntity, a fetch for the entity set of the contacts and using a custom "objSort" method that sorts based on the returned timestamp values from the object set.

0 comments voice your opinion now!
azure sort table timestamp arraymultisort tutorial


blog comments powered by Disqus

Similar Posts

PHPMac.com: Building and Installing Apache 2.2.2 and PHP 5.1.3 (or 5.1.4) on Mac OS X 10.4.6

DevShed: Handling Entries for a Blogger Built with PHP

Inside Open Source: Two New Articles (Date/Time & Services_Google)

DevShed: Generate PDF Documents with PHP on the Windows Platform

Jim Plush's Blog: Why Your PHP app NEEDS a Circuit Breaker


Community Events











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


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

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