PHP Classes

PhpDtObject: Database table access classes for php

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 977 This week: 1All time: 3,716 This week: 560Up
Version License Categories
phpdtobject 1.0GNU Lesser Genera...Databases, Data types
Description 

Author

These classes simplify the process of retrieving, editing, inserting and delete rows from the database table.

PhpDtObject creates an object from a table row or an array of objects if multiple rows are retrieved from the table.

Objects can also be created with init method, that passes primary key value (usually id) to getOne and getMany methods that can take complex searching criteria.

Rows can be updated, deleted and new rows created with a simple method calls.

By extending this class you have basic access to the database tables and you can concentrate to your own class functionality.

These classes are quite similar to DAO (Data Access Objects) but may be used for other purposes.

PhpDtObject requires ADOdb database abstraction layer.

Picture of Marko Tapio Manninen
Name: Marko Tapio Manninen <contact>
Classes: 3 packages by
Country: Finland Finland
Age: 48
All time rank: 3432 in Finland Finland
Week rank: 411 Down3 in Finland Finland Down

Details

********************************************************************************************* PhpDtObject v. 0.01 Database table access classes for php. These classes simplifies the procedure, when trying to get information, edit, insert or delete rows from the database table. PhpDtObject makes an object from the table row or an object array if multiple rows are returned from the table. Objects can also be created with init method, that passes primary key (usually id) and its value or by getOne / getMany methods where you can specify more complex searching criteria. Rows can be updated, deleted and new rows created with a simple method calls. By extending this class you have basic access to the database tables and you can concentrate to your own class functionality. Classes are quite similar to Dao, but may be used for little different purposes. PhpDtObject uses ADOdb (database abstraction layer), so it requires ADOdb to be installed on server. ADOdb is a free set of php classes, that you can download from: http://php.weblogs.com/adodb ********************************************************************************************* INCLUDED FILES ReadMe.txt Actually you are reading it now! index.html HTML-format of ReadMe file License.txt GNU LESSER GENERAL PUBLIC LICENSE. DBConn.php Database connection class. PhpDtObject.php Main class. Include this to your applications. PhpDtObject_DB.php This class is included automatic with PhpDtObject test.php Test and example file. In addition to these files PhpDtObject needs ADOdb package to support different databases. You can download ADOdb from: http://php.weblogs.com/adodb Whole package with all necessary files can be downloaded from: http://www.hmv-systems.fi/marko/PhpDtObject/PhpDtObject_with_ADOdb.zip or http://mcenter.artesaani.net/OWAB/ -> PhpDtObject ********************************************************************************************* AUTHOR Marko Manninen 8.6.2004, Sahalahti mob: +358 44 2927529 email: marko.manninen@hmv-systems.fi web: http://www.hmv-systems.fi/marko/PhpDtObject/ web: http://mcenter.artesaani.net/OWAB/

  Files folder image Files  
File Role Description
Plain text file DBConn.php Class Database connection class
Accessible without login HTML file index.html Doc. ReadMe html file
Plain text file PhpDtObject.php Class Main class
Plain text file PhpDtObject_DB.php Class Main class, database logic layer
Plain text file PhpDtObject_native_mysql.php Class - Enhanced PhpDtObject class with a new and performance tuned database table access methods. Database query layer that implements native mysql functions of php is on a same file so this class does not require ADOdb to work. Just include the file and get table contents even without generating separate classes for single tables and without making separate xml / sql configuration files. So "one class works for multiple tables." Extend class for more heavy and complex use. - Basic public methods are: init, getValue, setValue, getOne, getMany,getIndex, save and delete. - Added public methods compairing to former published PhpDtObject class are: initByKey, gv, gvm, sv, getNumRows, getAffectedNumRows, getMixed, getMidexIndex, getLastSelectNumRows, singleUpdate, setMask, clearMask, getErrors and assignArray. - Multiple keys are handled now by calling initByKey method instead of normal init that is used when only one primary key field is found from the database table.
Accessible without login Plain text file ReadMe.txt Doc. ReadMe file
Accessible without login Plain text file test.php Example Test & example script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:977
This week:1
All time:3,716
This week:560Up