Home » Database » DB_Table
An object oriented interface to, and model of, a database. Integrates with HTML_QuickForm.
This package is unmaintained.
Download latest release 1.5.6 (archived versions might be outdated)
License: New BSD
Description
The DB_Table package provides an object oriented interface to a database.
Each instance of the core DB_Table class contains the schema for a table, defined using abstract data types. The class provides a portable api for insert, update, delete, and select SQL commands, and can validate data types upon insertion and updating. It provides methods to automatically create or verify a database table. DB_Table also provides methods (using PEAR HTML_QuickForm) to generate input forms that match the column definitions.
Each instance of the DB_Table_Database class contains a model of relationships between tables in a database, in which each table is represented by an instance of DB_Table. DB_Table_Database provides a method for automatic construction of join conditions for inner joins involving any number of tables, optional php validation of foreign key validity, and optional php emulation of actions triggered on delete or update of referenced rows, such as cascading deletes.
The DB_Table_Generator class auto-generates the php code necessary to create an interface to an existing database.
Documentation
Maintainers
- Paul M. Jones (pmjones) — lead, inactive
- David Morse (morse) — lead, inactive
- Mark Wiesemann (wiesemann) — lead, active
Dependencies
Required
- PHP (>= 4.3.0)
- PEAR Installer (>= 1.5.0)
Optional
- HTML_QuickForm
- DB (>= 1.7.11)
- MDB2 (>= 2.4.1)
Releases
- 1.5.6 (stable, 2008-12-25)
Release notes
License: New BSD
- Feature Request #14262: due to Oracle's limitations, table/column/index
names were restricted to a maximum length of 30 characters; by setting
$GLOBALS['_DB_TABLE']['disable_length_check'] to (boolean) true, this
check can now be disabled (attention: your code will not be compatible
with Oracle anymore if you're using longer names) - 1.5.5 (stable, 2008-06-17)
- 1.5.4 (stable, 2008-06-08)
- 1.5.3 (stable, 2008-06-06)
- 1.5.2 (stable, 2008-05-14)
- 1.5.1 (stable, 2008-03-28)
- 1.5.0 (stable, 2007-06-27)
- 1.5.0RC3 (beta, 2007-06-14)
- 1.5.0RC2 (beta, 2007-03-24)
- 1.5.0RC1 (beta, 2007-02-06)
- 1.4.0 (stable, 2006-11-09)
- 1.3.2 (stable, 2006-07-25)
- 1.3.1 (stable, 2006-07-19)
- 1.3.0 (stable, 2006-04-26)
- 1.3.0RC5 (beta, 2006-04-19)
- 1.3.0RC4 (beta, 2006-04-13)
- 1.3.0RC3 (beta, 2006-04-07)
- 1.3.0RC2 (beta, 2006-04-07)
- 1.3.0RC1 (beta, 2006-02-27)
- 1.2.1 (stable, 2005-09-13)
- 1.2.0 (stable, 2005-08-29)
- 1.1.0 (stable, 2005-08-07)
- 1.0.1 (stable, 2005-05-28)
- 1.0.0 (stable, 2005-03-07)
- 1.0.0RC1 (beta, 2005-02-23)
- 0.23.0 (beta, 2004-12-30)
- 0.22.0 (beta, 2004-10-27)
- 0.21.2 (alpha, 2004-07-12)
- 0.21.1 (alpha, 2004-07-11)
- 0.21 (alpha, 2004-07-11)
- 0.18 (alpha, 2004-04-23)
- 0.17 (alpha, 2004-04-21)
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #1541 | Closed | Req | 2004-06-02 | 2 little feature requests | |
| #1671 | Closed | Bug | 2004-06-17 | Missing dependency | |
| #1794 | Closed | Bug | 2004-07-05 | Bug in creation of (adv)checkbox | |
| #1797 | Closed | Bug | 2004-07-05 | Missing QF rules | |
| #1837 | Closed | Bug | 2004-07-10 | Joins don't work not as they're documented | |
| #1855 | Closed | Bug | 2004-07-12 | QuickForm: Error "$type not defined" because piece of code is wrong positioned | |
| #2160 | Bogus | Req | 2004-08-19 | Different Tables in one class definition | |
| #2522 | Closed | Req | 2004-10-13 | [PATCH] Create bare QuickForm | |
| #2596 | Wont fix | Req | 2004-10-23 | Native MySQL timestamps needed | |
| #2789 | Closed | Req | 2004-11-18 | [PATCH] Per-query fetchmodes | |
| #2790 | Closed | Req | 2004-11-18 | [PATCH] getFormElements() | |
| #2799 | Closed | Bug | 2004-11-19 | Error in getFormElement | |
| #2842 | Suspended | Req | 2004-11-27 | autodrop sequencing table - w/ patch | |
| #2906 | Closed | Req | 2004-12-06 | $this->table attribute acces | |
| #2918 | Closed | Bug | 2004-12-08 | DB_Table::recast($data) timestamp zero packing | |
| #3017 | Closed | Req | 2004-12-22 | [PATCH[ selectCount() | |
| #3018 | Closed | Req | 2004-12-22 | Data overrides in getElement | |
| #3360 | Closed | Bug | 2005-02-02 | missing dep on DB | |
| #3407 | Closed | Req | 2005-02-08 | add "name" for static QF elements | |
| #3825 | Closed | Req | 2005-03-15 | Change $elemname in error messages to $col['qf_label'] | |
| #3892 | Closed | Bug | 2005-03-20 | Error in DB_Table_QuickForm->addElements | |
| #4209 | Bogus | Bug | 2005-04-22 | Uncontroled restrictions to field names | |
| #4610 | Closed | Req | 2005-06-16 | small addition to fixColDef() | |
| #4614 | Closed | Bug | 2005-06-16 | radios do not line up | |
| #4657 | Closed | Req | 2005-06-21 | allow adding of null values to the database | |
| #4935 | Closed | Bug | 2005-07-28 | DB_Table_Quickform: Element names as Array-Keys not respected for radio buttons | |
| #4941 | Closed | Req | 2005-07-28 | allow a label after (adv)checkbox elements | |
| #5029 | Closed | Req | 2005-08-08 | [PATCH] HTML_QuickForm filter support | |
| #5060 | No Feedback | Bug | 2005-08-10 | empty date fields cause data to be invalid | |
| #5382 | Closed | Bug | 2005-09-13 | Radios not filled with default Value | |
| #5478 | Closed | Req | 2005-09-21 | Verify schema/referential integrity | |
| #5479 | Closed | Req | 2005-09-21 | Deeper abstraction of DB_Table | |
| #5552 | Closed | Doc | 2005-09-28 | No explanation of properties | |
| #5679 | Closed | Bug | 2005-10-13 | Warning if no table-index defined | |
| #5915 | Bogus | Bug | 2005-11-09 | radio button value do not select dynamically by default value | |
| #5965 | Closed | Req | 2005-11-15 | Turn off automatic setting of qf_rules | |
| #6012 | Bogus | Bug | 2005-11-19 | Lack of support for datetime | |
| #6025 | Closed | Bug | 2005-11-21 | $auto_create & postgres & table names containing uppercase letters | |
| #6036 | Closed | Req | 2005-11-22 | interface to add further Quickform-Elements | |
| #6384 | Closed | Req | 2005-12-31 | add MDB2 | |
| #6497 | Bogus | Bug | 2006-01-15 | this->table got parse error | |
| #6655 | Closed | Bug | 1.2.1 | 2006-02-01 | column Default |
| #6749 | Bogus | Req | 1.2.1 | 2006-02-10 | Wondering if you'd like to use this as a log example |
| #7287 | Closed | Bug | CVS | 2006-04-04 | create is triggered while in 'alter' mode |
| #7398 | Closed | Req | 1.3.0RC4 | 2006-04-14 | Validation against QuickForm parameters not wanted |
| #7568 | No Feedback | Bug | 1.3.0 | 2006-05-05 | recast and quoted date/timestamp values |
| #8249 | Closed | Req | 1.3.1 | 2006-07-19 | in grouped Radio-Elements |
| #8268 | Closed | Bug | 1.3.1 | 2006-07-23 | selectCount() gives pear error, if as-names are used for where, group, order |
| #8485 | Closed | Req | CVS | 2006-08-16 | Remove assumption that DB_Table will be subclassed |
| #8760 | Wont fix | Req | 2006-09-21 | Insert only if row doesn't exist | |
| #8767 | Wont fix | Req | 1.3.2 | 2006-09-22 | Only expand index names for PostgreSQL |
| #8874 | Wont fix | Bug | CVS | 2006-10-06 | Test (please ignore) |
| #9141 | Closed | Req | 1.3.2 | 2006-10-23 | Support for hierselect |
| #9240 | Closed | Doc | 1.3.2 | 2006-11-06 | wrong documentation |
| #9441 | Spam | Req | CVS | 2006-11-24 | freeman |
| #9593 | Closed | Bug | 1.4.0 | 2006-12-10 | incorrect mapping |
| #9686 | Spam | Req | CVS | 2006-12-23 | malekss |
| #11077 | Wont fix | Req | 1.5.0RC2 | 2007-05-19 | generate real check box forms |
| #11278 | Suspended | Req | 1.5.0RC2 | 2007-06-11 | Need a method to drop exist columns in DB_Table_Manager class |
| #11298 | Suspended | Req | CVS | 2007-06-12 | Ability to mark columns as ignored |
| #11986 | Closed | Doc | 2007-09-05 | User note that is a documentation problem | |
| #12093 | Closed | Doc | 1.5.0 | 2007-09-21 | line '$generator =& DB_Table_Generator($conn, $database);' ->undefined function |
| #12136 | Closed | Req | 1.5.0 | 2007-09-28 | Support for 'link' QF element |
| #12137 | Suspended | Req | 1.5.0 | 2007-09-28 | Add support for queries in QF 'select' elements |
| #12190 | Closed | Bug | 1.5.0 | 2007-10-06 | missing error return in DB_Table_Manager::create() |
| #12208 | Closed | Bug | 1.5.0 | 2007-10-09 | wrong verification of clob fields with mysql(i) backend |
| #12214 | Suspended | Req | 1.5.0 | 2007-10-10 | Support MDB2_Schema description and comments tags |
| #12247 | Closed | Bug | 1.5.0 | 2007-10-15 | 'require' attribute is name 'required' in Generator |
| #12497 | Closed | Bug | 2007-11-21 | Generator works only with DB, but not with MDB2 | |
| #12510 | Closed | Req | CVS | 2007-11-23 | some changes in Generator.php |
| #12989 | Suspended | Req | 1.5.0 | 2008-01-28 | new method/callback: defineColumns? |
| #13267 | Closed | Req | CVS | 2008-02-29 | Table name should be optional in constructor parameter list |
| #13700 | Duplicate | Bug | 1.5.1 | 2008-04-17 | bug? |
| #13701 | Closed | Bug | 1.5.1 | 2008-04-17 | Undefined variable $db in Generator.php |
| #13728 | Closed | Bug | 1.5.1 | 2008-04-20 | DB_Table_Generator produces invalid php code when using pgsql |
| #13858 | Duplicate | Bug | 1.5.1 | 2008-05-08 | Notice: Undefined variable: db in /includes/p |
| #13949 | No Feedback | Req | 1.5.2 | 2008-05-20 | Generator should enclose building Database instance in a function |
| #14048 | Closed | Doc | 2008-06-02 | User note that is a documentation problem | |
| #14082 | Closed | Bug | 1.5.2 | 2008-06-05 | DB_Table_Manager::getIndexes() misbehaviour |
| #14106 | Closed | Bug | CVS | 2008-06-08 | "PRIMARY" not allowed as index name |
| #14224 | Bogus | Bug | 1.5.5 | 2008-06-24 | Decimal Column's Scale Bug of generated Table Class |
| #14262 | Closed | Req | 1.5.5 | 2008-06-30 | Ability to change maximum length of sequences |
| #14688 | Bogus | Req | 1.5.5 | 2008-09-22 | Can't insert with an auto increment field without having a sequence table |
| #15370 | Wont fix | Req | 1.5.5 | 2008-12-21 | Build Form without DB-Connection |
| #15871 | No Feedback | Bug | 1.5.6 | 2009-02-03 | Alter table problems when changing size |
| #17707 | Assigned | Bug | SVN | 2010-08-16 | Failing tests |
| #18514 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18515 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18516 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18517 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18518 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18519 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18520 | Spam | Doc | 2011-05-10 | User note that is a documentation problem | |
| #18522 | Spam | Doc | 2011-05-10 | User note that is a documentation problem |