PHP Classes
elePHPant
Icontem

DATA: Access data stored in MySQL tables like arrays

Recommend this page to a friend!
  Info   View files View files (50)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-09-04 (9 years ago) RSS 2.0 feedStarStarStar 55%Total: 1,320 All time: 2,824 This week: 958Up
Version License PHP version Categories
data 0.8.0GNU Lesser Genera...5.1PHP 5, Databases
Description Author

DATA stands for Database Access Through Arrays. This package can be used to access data stored in MySQL tables like accessing arrays. It uses SPL to implement several classes and iterators interfaces to access MySQL databases.

Examples:

$DB['test_table'][] = array(
'name' => 'first',
'value' => 'the first row'
);

foreach ($DB['test_table'] as $i => $row) {
...
}

$DB['test_table']['first']['value'] = '1st';

unset($DB['test_table']['first']);

Innovation Award
PHP Programming Innovation award nominee
April 2007
Number 8


Prize: One subscription to the PDF edition of the magazine by PHP Architect
One of the new features introduced with PHP 5 is the iterator interfaces provided by the SPL (Standard PHP Library) extension.

SPL allows applications to traverse objects using regular functions used to traverse array members.

This class provide new SPL iterators that allow applications to easily traverse data from MySQL databases using the same array traversal functions.

Manuel Lemos
Picture of Martin Alterisio
Name: Martin Alterisio <contact>
Classes: 5 packages by
Country: Argentina Argentina
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Files folder imageDATA (34 files, 1 directory)
Accessible without login Plain text file example.php Example An usage example
Accessible without login Plain text file example.sqltypes.php Example An usage example
Accessible without login Plain text file data.lib.php Appl. Main include file of the DATA library.
Accessible without login Plain text file data.mysql5.lib.php Appl. Include to use the DATA library using a MySQL5 database.

  Files folder image Files  /  DATA  
File Role Description
Files folder imageMySQL5 (12 files)
  Accessible without login Plain text file AssociativeIndexingStrategy.php Class An interface to algorithmic solutions for mapping an associative array index to rows in a database table.
  Accessible without login Plain text file CannotRemoveField.php Class An exception thrown when an unset has been tried on a row field.
  Accessible without login Plain text file Exception.php Class All exceptions inside the DATA library extend this exception.
  Accessible without login Plain text file FieldDoesntExist.php Class An exception thrown when trying to read a field that doesn't exist on the table.
  Accessible without login Plain text file IndexingStrategyException.php Class All exceptions that occur on indexing strategies extend this exception.
  Accessible without login Plain text file InvalidDate.php Class An exception thrown when a sql date field is filled with an invalid value.
  Accessible without login Plain text file InvalidDatetime.php Class An exception thrown when a sql datetime field is filled with an invalid value.
  Accessible without login Plain text file InvalidDecimal.php Class An exception thrown when a sql decimal field is filled with an invalid value or has overflown its capacity.
  Accessible without login Plain text file InvalidInt.php Class An exception thrown when a sql int field is filled with an invalid value or has overflown its capacity.
  Accessible without login Plain text file InvalidTime.php Class An exception thrown when a sql time field is filled with an invalid value.
  Accessible without login Plain text file NotImplemented.php Class An exception thrown when a feature hasn't been implemented yet.
  Accessible without login Plain text file NotNullable.php Class An exception thrown when trying to null a not nullable sql field.
  Accessible without login Plain text file Number.php Class Interface for numerical objects.
  Accessible without login Plain text file PrimaryKeyNeeded.php Class An exception thrown when a primary key is required for the operation requested.
  Accessible without login Plain text file PrimaryKeyTooLarge.php Class An exception thrown when a primary key is too large for the operation requested.
  Accessible without login Plain text file ReadOnly.php Class An exception thrown when access to the database through an object is read only.
  Accessible without login Plain text file RowDoesntExist.php Class An exception thrown when trying to read a row that doesn't exist on the table.
  Accessible without login Plain text file SQLChar.php Class ANSI SQL Character data type representation.
  Accessible without login Plain text file SQLCharFactory.php Class A concrete factory for inboxing strings into char fields.
  Accessible without login Plain text file SQLDate.php Class ANSI SQL Date data type representation.
  Accessible without login Plain text file SQLDatetime.php Class ANSI SQL Datetime data type representation.
  Accessible without login Plain text file SQLDecimal.php Class ANSI SQL arbitrary size number with decimals data type representation.
  Accessible without login Plain text file SQLDecimalFactory.php Class A concrete factory for inboxing php values into decimal fields.
  Accessible without login Plain text file SQLInt.php Class ANSI SQL Integer data type representation.
  Accessible without login Plain text file SQLIntFactory.php Class A concrete factory for inboxing php values into int fields.
  Accessible without login Plain text file SQLSmallInt.php Class ANSI SQL small integer data type representation.
  Accessible without login Plain text file SQLSmallIntFactory.php Class A concrete factory for inboxing php values into small int fields.
  Accessible without login Plain text file SQLTime.php Class ANSI SQL Time data type representation.
  Accessible without login Plain text file SQLType.php Class SQL type representation.
  Accessible without login Plain text file SQLTypeConstraintFailed.php Class An exception thrown when an sql type constraint fails to apply to a value.
  Accessible without login Plain text file SQLTypeFactory.php Class Abstract factory for SQL types representations.
  Accessible without login Plain text file SQLVarchar.php Class ANSI SQL Character Varying data type representation.
  Accessible without login Plain text file SQLVarcharFactory.php Class A concrete factory for inboxing strings into varchar fields.
  Accessible without login Plain text file StringTooLarge.php Class An exception thrown when a sql character field cannot hold the string provided by the user.

  Files folder image Files  /  DATA  /  MySQL5  
File Role Description
  Accessible without login Plain text file Access.php Class This class provides basic interaction with a MySQL5 database.
  Accessible without login Plain text file Database.php Class This class is the abstraction of a MySQL5 database implementing the array access behavior.
  Accessible without login Plain text file DefaultIndexingStrategy.php Class Default strategy for mapping an associative array index to rows in a database table.
  Accessible without login Plain text file Error.php Class An exception thrown when an error is detected on an operation with a MySQL5 database.
  Accessible without login Plain text file PrimaryKeyIndexingStrategy.php Class Strategy for mapping array offsets to primary key values.
  Accessible without login Plain text file Row.php Class This class is the abstraction of a MySQL5 table row implementing the array access and iteration behavior.
  Accessible without login Plain text file Schema.php Class MySQL5 schema observation functions class
  Accessible without login Plain text file SQLDateFactory.php Class A concrete factory for inboxing string with mysql date format into date objects.
  Accessible without login Plain text file SQLDatetimeFactory.php Class A concrete factory for inboxing string with mysql datetime format into datetime objects.
  Accessible without login Plain text file SQLTimeFactory.php Class A concrete factory for inboxing string with mysql time format into time objects.
  Accessible without login Plain text file Table.php Class This class is the abstraction of a MySQL5 table implementing the array access and iteration behavior.
  Accessible without login Plain text file TableIterator.php Class Table rows iterator.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,320
This week:0
All time:2,824
This week:958Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:55%StarStarStar
Rank:1602