Top Level :: Database

Package Information: DB_Table

Show All Changelogs
» Version » Information
1.5.5Download

Release date: 2008-06-17 13:07 UTC
Release state: stable

Changelog:

- fix for installation problems on some Linux installations, no code changes

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.4Download

Release date: 2008-06-08 17:50 UTC
Release state: stable

Changelog:

- Bug #14106: "PRIMARY" not allowed as index name

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.3Download

Release date: 2008-06-06 12:36 UTC
Release state: stable

Changelog:

- Bug #14082: fixed index type detection (due to changes in MDB2 2.5.x)
(thanks to Gregor Gramlich for the patch)

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.2Download

Release date: 2008-05-14 18:38 UTC
Release state: stable

Changelog:

- Bug #13701: Undefined variable $db in Generator.php
(thanks to Youichi Okada)
- Bug #13728: generator produced invalid variable names (e.g. containing a dot)
(thanks to Peter Pawluczuk)

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.1Download

Release date: 2008-03-28 19:20 UTC
Release state: stable

Changelog:

- this package is now licensed under the New BSD license
- Request #12136: support for 'qf_type' == 'link' is now available, providing
access to the "link" element of HTML_QuickForm; the link href needs to be
specified in the 'qf_href' key, the link text needs to be specified in the
'qf_setvalue' key
(thanks to Diederick Huijbers)
- Bug #12190: missing error return in DB_Table_Manager::create()
(thanks to Carsten Wiedmann for the patch)
- Bug #12208: wrong verification of clob fields with mysql(i) backend
(thanks to Carsten Wiedmann)
- Bug #12247: 'require' attribute is name 'required' in Generator
(thanks to Gregor Gramlich)
- Bug #12497: Generator works only with DB, but not with MDB2
(thanks to Carsten Wiedmann for the patch)
- Request #12510: various optimizations (mostly coding standards) and
corrections (missing error return call, change MDB2's portability mode only
temporarily)
(thanks to Carsten Wiedmann for the patch)
- Request #13267: constructor's $table parameter is now optional; this change
allows to set a fixed table name via the $table property in the DB_Table
subclass

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.0Download

Release date: 2007-06-27 22:27 UTC
Release state: stable

Changelog:

This is the first stable release that contains some signficant enhancements to DB_Table. The main changes since release 1.4.0 are:
- A new DB_Table_Database class, which contains a model of relationships between tables. The class contains methods to simplify the construction of joins, check foreign key validity, and emulate referentially triggered ON DELETE and ON UPDATE actions.
- A new DB_Table_Generator class, which generates PHP code necessary for an existing database. Generates a skeleton DB_Table subclass definition for each table in the database.
- A new DB_Table_Base class, as an abstract parent class for DB_Table and DB_Table_Database.
- Added auto-increment column declarations to DB_Table
- Select*() methods can now process query arrays passed as arguments (as well as stored queries).
- XML support, using the MDB2 XML schema. XML Serialization and unserialization of the database model.
- Full unit tests for DB_Table_Database.
- Full documentation added to the PEAR manual.

The only changes since release 1.5.0RC3 are changes to the organization of the DB_Table_Database unit tests, and inclusion of a simple form of regression testing. See tests/database/README.

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.0RC3Download

Release date: 2007-06-14 19:12 UTC
Release state: beta

Changelog:

- Added complete documentation in the PEAR manual.
- new DB_Table_Base class added. This is a parent class for DB_Table and DB_Table_Database that contains methods and properties common to both classes.
- The DB_Table::select*() and DB_Table::buildSQL() methods, which are now inherited from the DB_Table_Base class, now accept either a query array or (as before) a key of the $sql property array as a first argument.
- Added DB_Table_Database::onDeleteAction() and DB_Table_Database::onUpdateAction() methods, which implement referentially triggered actions (e.g., cascading deletes). This code had previously been part of the DB_Table_Database insert() and update() methods.
- Changed behavior of DB_Table::insert() and DB_Table::update() method for a DB_Table object that is part of a DB_Table_Database instance: If a parent DB_Table_Database object exists, these methods can now validate foreign keys and implement ON DELETE and ON UPDATE actions, if these behaviors are enabled in the parent DB_Table_Database object. The behaviors of the DB_Table and DB_Table_Database insert and update methods are now identical. (This is a BC break with 1.5.0RC1 and 1.5.0RC2 beta releases, but not with earlier stable releases.)
- Disable automatic foreign key validation by default (BC break with releases 1.5.0RC1 and 1.5.0RC2).
- Added buildFilter() method to the DB_Table_Base class. This a simplified version of the DB_Table_Database::buildFilter() method of previous 1.5.0RC* releases. (BC break with 1.5.0RC1 and 1.5.0RC2)
- Added a private DB_Table_Database::_buildForeignKeyFilter() for more specialized uses of the old buildFilter() method, which are used internally to construct queries.
- Changed return value of DB_Table_Database::validForeignKey on failure from boolean false to PEAR_Error. Changed related error codes.
- Changed <autoinc> element of XML output to <autoincrement> for consistency with MDB2 XML schema.
- Simplified unit tests for DB_Table_Database by adding a parent DatabaseTest unit test class.

Dependencies:
  • PHP Version: PHP 4.3.0 or newer
  • PEAR Package: PEAR Installer 1.5.0 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.11 or newer (optional)
  • PEAR Package: MDB2 2.4.1 or newer (optional)
1.5.0RC2Download

Release date: 2007-03-25 03:37 UTC
Release state: beta

Changelog:

- new DB_Table_Generator class added. This class generates code required as an interface to an existing database by reverse engineering the databcase. It generates a DB_Table subclass definition for each table, and a script that instantiates one instance of each DB_Table subclass, and a parent DB_Table_Database object. See the documentation block for the new class for usage instructions, and the tests/generator/tests.php script for an example.

Dependencies:
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.5.0RC1Download

Release date: 2007-02-06 06:32 UTC
Release state: beta

Changelog:

- New DB_Table_Database class added to package. The new class provides a model
of foreign key relationships between tables in a database, and features that
depend on knowledge of these relationships. User documentation for this
class is provided in docs/database/manual.html.
- Added auto-increment feature to DB_Table insert() method. The value of a new
$auto_inc_col property is the name of an auto-increment column (if any) or
null.
- added toXML() method to DB_Table, which emits the table schema in the MDB2
XML DTD, with an extension to describe foreign key references. This method
is called by the toXML() method of DB_Table_Database, which emits an XML
schema string for an entire database.

Dependencies:
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.4.0Download

Release date: 2006-11-09 20:57 UTC
Release state: stable

Changelog:

- Static form elements like 'header', 'static', 'submit' or 'reset' can now
easily be added: define an array called $frm in your class, create a form
object (e.g. yourself, via $obj->getForm(), ...) and then call
$obj->addStaticFormElements($form);
The $frm array has a very similar format like the column definition format. The
key is the field name and the value is an array with details about the element.
There is a special key called 'before' in the details array. If it is not
given, or is empty (or null) the element will be appended at the end. If it is
given, the element is added before the element specified via 'before'.
Example:
var $frm = array('headline' => array('before' => 'name',
'qf_type' => 'header',
'qf_setvalue' => 'Headline'
),
'submit' => array('before' => null,
'qf_type' => 'submit',
'qf_setvalue' => 'Save data'
));
This example assumes that there is an element called 'name' in the form. The
header element will be placed before this 'name' element, and the submit button
will be placed at the end of the form.
- added support for 'hierselect' and 'jscalendar' QuickForm elements as
'qf_type' values in the column definition arrays
(thanks to Arne Bippes and QDog for the patches)
- fixes / optimizations for columns with 'qf_type' == 'file':
* if the column is marked as required, the 'uploadedfile' QF rule is now set
instead of the 'required' QF rule
* the 'numeric' and 'maxlength' QF rules are not set anymore (the corresponding
checks will still be done before inserting/updating data into the database)
- fixed wrong handling of errors in the constructor

Dependencies:
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: MDB2 2.0.1 or newer (optional)
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
1.3.2Download

Release date: 2006-07-25 10:25 UTC
Release state: stable

Changelog:

- Bug #8249: &nbsp; occured wrongly between grouped radio buttons
(thanks to Arne Bippes, arne dot bippes at brandao dot de)
- Renamed the key 'qf_radiosep' for the separator of grouped QuickForm elements
into 'qf_groupsep', as it is not only used for radio buttons

Dependencies:
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PEAR Package: HTML_QuickForm
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.1Download

Release date: 2006-07-19 09:33 UTC
Release state: stable

Changelog:

- updated the allowed data types for 'alter' and 'verify' modes according to
the latest MDB2 changes

Dependencies:
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PEAR Package: HTML_QuickForm
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0Download

Release date: 2006-04-26 15:56 UTC
Release state: stable

Changelog:

Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of QuickForm and custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier

Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
* Fixed handling of QuickForm rules: If there was a server-side-only
rule (like 'uploadedfile'), client-side validation was disabled
for all rules. Now it is disabled only for server-side-only rules.
* You can now use an extended HTML_QuickForm object by specifying
the class name in $_DB_TABLE['qf_class_name']. (Attention: You
have to include the extended class file yourself.)

Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PHP Version: PHP 4.0.0 or newer
  • PEAR Package: PEAR Installer 1.4.0b1 or newer
  • PEAR Package: HTML_QuickForm
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0RC5Download

Release date: 2006-04-19 18:56 UTC
Release state: beta

Changelog:

Changes since 1.3.0RC4:
* Fixed a safe mode issue that occured when MDB2 is used as backend.
Changes since 1.3.0RC3:
* Fixed handling of QuickForm rules: If there was a server-side-only
rule (like 'uploadedfile'), client-side validation was disabled
for all rules. Now it is disabled only for server-side-only rules.
* You can now use an extended HTML_QuickForm object by specifying
the class name in $_DB_TABLE['qf_class_name']. (Attention: You
have to include the extended class file yourself.)
Changes since 1.3.0RC2:
* Fixed copy & paste errors introduced by fixing bug #7287.
Changes since 1.3.0RC1:
* Bug #7287: create() was called when using the new creation modes
'verify' or 'alter'. This can be seen as a BC break (especially
when somebody extends DB_Table), and therefore, there are new
methods verify() and alter() in DB_Table class.
(thanks to vdb at mail dot ru)
Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier
Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0RC4Download

Release date: 2006-04-13 15:22 UTC
Release state: beta

Changelog:

Changes since 1.3.0RC3:
* Fixed handling of QuickForm rules: If there was a server-side-only
rule (like 'uploadedfile'), client-side validation was disabled
for all rules. Now it is disabled only for server-side-only rules.
* You can now use an extended HTML_QuickForm object by specifying
the class name in $_DB_TABLE['qf_class_name']. (Attention: You
have to include the extended class file yourself.)
Changes since 1.3.0RC2:
* Fixed copy & paste errors introduced by fixing bug #7287.
Changes since 1.3.0RC1:
* Bug #7287: create() was called when using the new creation modes
'verify' or 'alter'. This can be seen as a BC break (especially
when somebody extends DB_Table), and therefore, there are new
methods verify() and alter() in DB_Table class.
(thanks to vdb at mail dot ru)
Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier
Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0RC3Download

Release date: 2006-04-07 20:14 UTC
Release state: beta

Changelog:

Changes since 1.3.0RC2:
* Fixed copy & paste errors introduced by fixing bug #7287.
Changes since 1.3.0RC1:
* Bug #7287: create() was called when using the new creation modes
'verify' or 'alter'. This can be seen as a BC break (especially
when somebody extends DB_Table), and therefore, there are new
methods verify() and alter() in DB_Table class.
(thanks to vdb at mail dot ru)
Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier
Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0RC2Download

Release date: 2006-04-07 16:55 UTC
Release state: beta

Changelog:

Changes since 1.3.0RC1:
* Bug #7297: create() was called when using the new creation modes
'verify' or 'alter'. This can be seen as a BC break (especially
when somebody extends DB_Table), and therefore, there are new
methods verify() and alter() in DB_Table class.
(thanks to vdb at mail dot ru)
Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier
Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.3.0RC1Download

Release date: 2006-02-27 14:25 UTC
Release state: beta

Changelog:

Short summary:
* New table creation modes 'verify' and 'alter'
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn't)
* Auto-creation of QuickForm rules can be disabled now
* Usage of custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier
Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
table definition and as function parameters) may now be null
(of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
isn't possible to create empty database tables and because
the work with DB_Table makes only sense with at least one
column.
* Fixed several return by reference problems (that caused
notices in PHP 4.4.x and 5.x).
* Fixed several "undefined index" problems (causing notices).
* Bugfix: select() and selectResult() didn't return error
objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
resulted in fatal error when 'formName' wasn't specified
in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
like 'numeric' or 'required' (can be done by setting
$cols[...]['qf_set_default_rules'] = false).
(thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
table with the same name but with different use of lower and
upper letters.
* Request #6036: new qf_type 'callback' which allows to add
custom QF elements that need more than the standard
parameters. You need to specify a key named 'qf_callback',
filled with either the name of a class (this class needs to
have a method 'createElement') or the name of a method.
Both method types must return true if the element was created
successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
via $GLOBALS['_DB_TABLE']['error'], you can now use
setErrorMessage() like this (assuming $obj is your DB_Table instance):
$obj->setErrorMessage(DB_TABLE_ERR_PHPTYPE, 'localized message');
or to set more than one message:
$obj->setErrorMessage(array(DB_TABLE_ERR_PHPTYPE => 'message 1',
DB_TABLE_ERR_NOT_DB_OBJECT => 'message 2'));
Static calls (DB_Table::setErrorMessage(...)) are also valid.
Setting the error messages via a static call or $GLOBALS is
especially needed for errors that can occur with-in the
constructor call (i.e. e.g. creating or altering the database table).
Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
whether all the columns exist, whether the columns have the
right type, and whether the indexes exists. This can be used
by setting $create in the constructor of your extended class
to 'verify' instead of false/'safe'/'drop'. In case of an
error in the schema, you will find the PEAR_Error object in
$obj->error (assuming $obj is your DB_Table instance).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
* New creation mode 'alter': If the table does not exist, it will
be created. Otherwise, table fields' existance and types will be
checked and, if needed, the field(s) will be added or changed. The
same applies for indexes' and constraints' existance and types.
Columns/indexes/constraints that don't exist anymore in the table
definition class, will NOT be removed.
- This is a new and powerful feature, use it with caution -- changing
a string datatype into a numeric datatype in your table definition
class may lead to data loss.
- Using " $_DB_TABLE['debug'] = true; " in your scripts will
output what will be changed. If something unexpected is changed,
please report it via PEAR's bug tracker (please include the
debug message and the column and/or index definition from your
table definition class, thanks).
- This is not available for 'fbsql' and 'mssql' phptypes.
('fbsql' is likely to be not supported in the future, while
'mssql' will be added when MDB2 has support for index and
constraint information for this DBMS.)
(thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
marked as 'primary' and will be created as the primary key of
the chosen table.
- This not available for 'sqlite' phptype, as SQLite does not
support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
backend. Just pass an MDB2 instance instead of a DB instance to
the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version >= 1.5
required). Because of the limited features of Interbase
(its ancestor), only Firebird is supported. Therefore,
'dbsyntax' must be set to 'firebird' in your DSN. Please note
that the ibase extension is very buggy in PHP 4, while it works
good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
slightly differ from the old messages.

Dependencies:
  • PEAR Package: DB 1.7.6 or newer (optional)
  • PEAR Package: HTML_QuickForm (optional)
  • PEAR Package: MDB2 2.0.1 or newer (optional)
1.2.1Download

Release date: 2005-09-13 14:53 UTC
Release state: stable

Changelog:

* Bug #5382: Setting default values via getForm() did not
work for radio elements because QuickForm "resets" the
checked state when one adds a group.

Dependencies:
1.2.0Download

Release date: 2005-08-29 10:48 UTC
Release state: stable

Changelog:

* Re-added request #4610 to add a 'label' key to column
definitions. this is in addition to the 'qf_label' key;
the qf_label key is for form labels, but the label key is
for column headers on tabular formats.

* Feature request #4941: new "qf_label_append" key for
columns that will be displayed after (adv)checkbox
QuickForm elements.

* Bugfix: QuickForm's date "element" is a group, therefore
we have to use addGroupRule() instead of addRule() for such
elements; this also fixes a bug with non-standard rules
when only an error message was given in the rule definition
(missing $format param).

* Feature request #5029: new "qf_filters" key for columns
that applies filters to DB_Table generated forms; with the
new $formFilters parameter in getForm() one can apply
filters to all form elements
(thanks to ieure at php dot net)

* Optimized some pieces of code and applied Coding Standards

* Bug #5060: Empty fields were wrongly casted to null it they
were required. Also making the casting to null for date and
time values work correctly.

* Added smart handling of non-standard (i.e. Y-m-d) date
formats, this allows to use two-digit years (y) and short (M)
or long (F) names of months without having to recast the date
value yourself.

Dependencies:
1.1.0Download

Release date: 2005-08-07 19:35 UTC
Release state: stable

Changelog:

* Added 'mysqli' support; thanks, James Kachel.

* Applied patch to allow passing of placeholder
substitutions in select(), selectResult(), and
selectCount(). Thanks, Matthew Weier O'Phinney.

* Added request #4610 to add a 'label' key to column
definitions. this is in addition to the 'qf_label' key;
the qf_label key is for form labels, but the label key is
for column headers on tabular formats.

* Added more-reliable way of generating the name and label
for a group when using addElements(), particularly with
respect to radio button sets. This fixes bug #4935,
"element names as array-keys not respected for radio
buttons."

* Fixed bug #4614; you can now specify the separator string
for radio buttons using the 'qf_radiosep' key; default is
'<br />'.

Dependencies:
1.0.1Download

Release date: 2005-05-28 13:41 UTC
Release state: stable

Changelog:

* Applied feature request 3825 "Change $elemname in error messages to $col['qf_label']" -- thanks, rotmer at gmail dot com
* Fixed bug 3892 "Error in DB_Table_QuickForm->addElements" when adding radio elements -- thanks, Mark Wieseman.

Dependencies:
1.0.0Download

Release date: 2005-03-07 23:21 UTC
Release state: stable

Changelog:

* First stable release.

Dependencies:
1.0.0RC1Download

Release date: 2005-02-23 17:42 UTC
Release state: beta

Changelog:

* first 1.0.0 release candidate
* Fixed bug 3360 (add dependency on DB)
* Added request 3407 (add "name" for static QF elements)
* Added request 3018 (allow custom formats for date, time,
timestamp in QuickForms). WARNING: The automatic casting
of date/time values may not work when specifying custom
formats for QF elements. The user who changes these
format values has to manually modify the string returned
from a QF form to a format acceptable by DB_Table (i.e.,
"yyyy-mm-dd" or "hh:ii:ss") before attempting to insert or
update; otherwise, data-level validation will fail.

Dependencies:
0.23.0Download

Release date: 2004-12-30 15:39 UTC
Release state: beta

Changelog:

* WARNING: MULTIPLE BC BREAKS related to naming conventions,
mostly because of Oracle. Read and heed the following two notes
before you upgrade. These are per email conversations with,
patches from, and suggestions by Alex Hoebart.

* BC BREAK on name lengths:

Table, column, index, and sequence names are now limited
to 30 characters at table-creation time via the create()
method in Manager.php. This means that column names and
must be no longer than 30 characters.

More confusingly, this means that generated index names
can be no longer than 30 characters total. DB_Table
generates index names using the table name, an
underscore, the index name, and a '_idx' suffix. This
combination of rules is to soothe PostgreSQL (which does
not allow identical index names even if they are on
different tables) and Oracle (which has a 30-char limit
on index names). This means that the table name
combined with the index name cannot be longer than 25
characters (becuase of the separating underscore and the
'_idx' suffix). Yes, this sucks. Well, Oracle sucks.
:-(

Error codes and messages have been added to notify of
the new rules. effect. This should only affect users
who are creating new tables with DB_Table and should not
affect existing tables and indexes.

* BC BREAK on sequences:

If no sequence name is defined in a call to nextID(),
DB_Table used to default to '_table_id' as the name of
the sequence, and DB would take that to create a
'_table_id_seq' sequence name. However, Oracle will not
allow a sequence name to start with '_'. In addition,
Oracle has a maximum length of 30 for sequence names.

For Oracle compliance, and in the interest of
consistency between DB and DB_Table, as well as keeping
names under 30 chars, DB_Table now uses only the table
name as the default, which means that DB translates this
into 'tablename_seq'. Also, the nextID() method will
check to make sure the sequence name will end up being
no longer than 30 chars.

Users of DB_Table should rename their sequences to
remove the initial underscore and change the trailing
'_id_seq' to just '_seq' for any automatically-generated
sequence names. If you do not, the upgrade to DB_Table
0.23.0 will create a new sequence restarting at 1 with
the new non-underscored different-suffix name on the
first call to nextID().

* Added 'autocomplete' as a supported element, per Alex
Hobart.

* Added new keys to the $sql property to support per-query
'fetchmode' and 'fetchmode_object_class' settings. Patch
provided by Ian Eure.

* Quickform.php addRules() method now supports any registered
rule. Patch provided by Alex Hoebart.

* Valid.php isChar() is less restrictive and allows numbers
in character fields. Patch provided by Alex Hoebart.

* Fixed bug 2799 "error in getFormElement", patch provided
by David Glenn.
* Fixed bug 2918 "recast($data) timestamp zero packing",
reported by Simon Massey.
* Added selectCount() method to let you get a row-count
on an existing query; patch provided by Ian Eure.

Dependencies:
0.22.0Download

Release date: 2004-10-27 22:09 UTC
Release state: beta

Changelog:

* Applied patch from Ian Eure to allow creation of a blank form

Dependencies:
0.21.2Download

Release date: 2004-07-12 15:25 UTC
Release state: alpha

Changelog:

* 0.21.2:
* fixed bug 1855 (incorrect checking of QuickForm type), thanks Hero Wanders
* reformatted change notes, keeping the whole 0.21.x series in place because of quick release cycle
* 0.21.1:
* Removed "CVS" file from package.xml (stupid oversight from a copy-and-paste)
* 0.21:
* Skipped 0.19 and 0.20 version numbers, internal releases only
* Fixed bug 1671 (missing dependency): package.xml now includes deps on Date and HTML_QuickForm (thanks, ja at morrdusk dot net)
* Fixed bug 1794 (checkbox creation): now sets element name properly (thanks, wiesemann at php dot net, herojoker [AT] nexgo [DOT] de, and alex [AT] hoebart [DOT] info)
* Fixed bug 1797 (missing QF rules): now supports rules for uploadedfile, maxfilesize, mimetype, and filename (thanks, wiesemann at php dot net)
* buildSQL() method no longer adds the key to JOIN snippets (thanks Mark Wiesemann)
* added autoRecast() method to turn on/off automatic recasting of data at insert() and update() time (suggested by Mark Wiesemann)
* Manager.php create() method checks for indexes on CLOB columns, which are disallowed
* can now specify additional QuickForm client-side rule validation, on a per-column basis, with the column 'qf_client' element
* getForm() and addRules() method have additional $clientValidate parameter to add or remove client-side rule validation on all elements regardless of column definition (suggested by Mark Wiesemann)
* QuickForm 'checkbox' elements now always map to 'advcheckbox' elements
* boolean columns now default to 'checkbox' with values of 0 and 1 (vice 'select')
* added bogus test script and reserved-word documents
* recast() now properly formats timestamp strings (thanks Mark Wiesemann)

Dependencies:
0.21.1Download

Release date: 2004-07-11 19:16 UTC
Release state: alpha

Changelog:

* Removed "CVS" file from package.xml (stupid oversight from a copy-and-paste)
* Skipped 0.19 and 0.20 version numbers, internal releases only
* Fixed bug 1671 (missing dependency): package.xml now includes deps on Date and HTML_QuickForm (thanks, ja at morrdusk dot net)
* Fixed bug 1794 (checkbox creation): now sets element name properly (thanks, wiesemann at php dot net, erojoker [AT] nexgo [DOT] de, and alex [AT] hoebart [DOT] info)
* Fixed bug 1797 (missing QF rules): now supports rules for uploadedfile, maxfilesize, mimetype, and filename (thanks, wiesemann at php dot net)
* buildSQL() method no longer adds the key to JOIN snippets (thanks Mark Wiesemann)
* added autoRecast() method to turn on/off automatic recasting of data at insert() and update() time (suggested by Mark Wiesemann)
* Manager.php create() method checks for indexes on CLOB columns, which are disallowed
* can now specify additional QuickForm client-side rule validation, on a per-column basis, with the column 'qf_client' element
* getForm() and addRules() method have additional $clientValidate parameter to add or remove client-side rule validation on all elements regardless of column definition (suggested by Mark Wiesemann)
* QuickForm 'checkbox' elements now always map to 'advcheckbox' elements
* boolean columns now default to 'checkbox' with values of 0 and 1 (vice 'select')
* added bogus test script and reserved-word documents
* recast() now properly formats timestamp strings (thanks Mark Wiesemann)

Dependencies:
0.21Download

Release date: 2004-07-11 17:05 UTC
Release state: alpha

Changelog:

* Skipped 0.19 and 0.20 version numbers, internal releases only

Dependencies:
0.18Download

Release date: 2004-04-23 15:41 UTC
Release state: alpha

Changelog:

* Index names are now prefixes with the table name and underscore, and are suffixed with '_index'; this is to soothe PostgreSQL, which does not like index names to be the same, even if they are on different tables.
* Default rule messages for 'required', 'maxlength', and 'numeric' are now globals and can be internationalized just like the error messages (thanks, Moritz Heidkamp)
* DB_Table_QuickForm now has better default support for unrecognized rules (thanks Moritz Heidkamp)
* Fixed 'static' element in DB_Table_QuickForm, now correctly displays label and value

0.17Download

Release date: 2004-04-21 12:24 UTC
Release state: alpha

Changelog:

* BREAKS BACKWARD COMPATIBILITY: You will need to edit and update your existing classes extended from DB_Table
* BC break: no longer uses a factory method; instantiate using "$obj =& new DB_Table();" and then check the error property ("if ($obj->error)...")
* BC break: all constants other than error codes are now string literals (e.g., DB_TABLE_COL_TYPE is now just 'type')
* BC break: method setup() no longer exists; you now define $this->col, $this->idx, and $this->sql as class properties (or in your extended constructor)
* BC break: DATETIME datatype is now named TIMESTAMP
* These should be the last major breaks in backwards compatibility; sorry for the trouble :-(
* Added 'char' native datatype and an emulated 'boolean' datatype
* Converted 'date', 'time', 'timestamp' emulated datatypes now created as fixed-length (not variable-length) character fields
* Added automatic check for reserved keywords under all supported databases at create() time (see the end of Manager.php)
* Improved auto-validation of 'decimal' data types
* Improved HTML_QuickForm element mapping and automation
* Improved fetchmode switching in select() and selectResult()
* Improved inline comments