Login   Register  
PHP Classes

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

  Author Author  
Picture of troy knapp
Name: troy knapp is available for providing paid consulting. Contact troy knapp .
Packages: 1 Browse all classes by troy knapp Browse all classes by
Country: United States United States - PHP jobs in United States
Age: 31
All time rank: 2826362 in United States United States
Week rank: 2048 Up242 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  Detailed description   Download Download .zip .tar.gz  
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).

  Classes of troy knapp  >  Multidim  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Multidim
Base name: multidim
Description: Manipulate multidimensional arrays in MySQL tables
Version: 1.1
PHP version: 5.0
Licenses: Artistic License
BSD License
All time users: 525 users
All time rank: 5050
Week users: 0 users
Week rank: 2192 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Databases Database management, accessing and searching View top rated classes
Group folder image Data types Modeling and manipulating data types View top rated classes

  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

  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  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

Download Download all files: multidim.tar.gz multidim.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.