Login   Register  
PHP Classes
elePHPant
Icontem

Multidim: Manipulate multidimensional arrays in MySQL tables

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2011-01-01 (3 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 536 This week: 1All time: 5,099 This week: 1,364Up
Version Licenses PHP version Categories  
multidim 1.1Artistic License, BSD L...5.0PHP 5, Databases, Data types
Description Author  

Have you ever wished you could deal with tables instead of multidimensional arrays, but didn't want the overhead associated with creating tables, populating them etc? This class is meant to be a simple alternative to using large associative data arrays. Elements are just as easy to add into temporary tables as they are to put into arrays, they are just as easy to get back out again... and MUCH easier to unset, filter and sort.

This class works by using an "array like" syntax (so it's easy to remember) and creates MySQL tables in memory. Basic functionality that you would expect to have when dealing with arrays is provided (in fact, you'll notice a striking similarity to what the methods "md_push" and "md_asort" do and their cousins do), but it leverages MySQL's ability to sort filter and delete etc. to simplify dealing with complex arrays. It also provides a wrapper method that allows the user to run their own SQL queries on the table (without having to worry about database connections or what the temporary table's name is).

Innovation Award  
PHP Programming Innovation award nominee
December 2010
Number 3


Prize: One downloadable copy of Komodo IDE
If you need to store multi-dimensional persistently, using a SQL database may be a way to achieve it. However, that is not trivial to implement.

This class provides a solution to greatly simplify the task of manipulating multi-dimension arrays stored in a MySQL database by the means of query language that allows inserting and finding array entry values.

Manuel Lemos
Picture of troy knapp
Name: troy knapp is available for providing paid consulting. Contact troy knapp .
Classes: 1 package by
Country: United States United States
Age: 32
All time rank: 2874367 in United States United States
Week rank: 1060 Up101 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file Multidim.php Class source file
Plain text file example.php Example several examples showing how to use the class and what it can do with outputs

 Version Control Unique User Downloads Download Rankings  
 0%Total:536All time:5,099
 This week:1This week:1,364Up