Docs For Class Zend_Db_Table

## Class Zend_Db_Table

Description

Class for SQL table interface.

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Db/Table.php (line 45)

Variable Summary
static Zend_Db_Adapter $_defaultDb
static Zend_Db_Inflector $_inflector
array $_cols
Zend_Db_Adapter $_db
array $_name
string $_primary
Method Summary
static void setDefaultAdapter (Zend_Db_Adapter $db)
Zend_Db_Table __construct ([array $config = null])
int delete (string $where)
mixed fetchAll ([string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
Zend_Db_Table_Row fetchNew ()
mixed fetchRow ([string|array $where = null], [string|array $order = null])
array find (scalar|array $val)
void getAdapter ()
array info ()
int insert ( &$data, array $data, string $where)
int update ( &$data, string $where, array $data)
mixed _fetch (string $type, [string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])
void _getDefaultAdapter ()
void _setup ()
Variables
static Zend_Db_Adapter $_defaultDb (line 52)

Default Zend_Db_Adapter object.

- access: protected

static Zend_Db_Inflector $_inflector (line 59)

For name inflections.

- access: protected

array $_cols (line 83)

The table column names derived from Zend_Db_Adapter_*::describeTable().

The key is the underscore format, and the value is the camelized format.

- access: protected

Zend_Db_Adapter $_db (line 66)

Zend_Db_Adapter object.

- access: protected

array $_name (line 73)

The table name derived from the class name (underscore format).

- access: protected

string $_primary = 'id' (line 90)

The primary key column (underscore format).

- access: protected

Methods
static method setDefaultAdapter (line 131)

Sets the default Zend_Db_Adapter for all Zend_Db_Table objects.

- access: public

static void setDefaultAdapter (Zend_Db_Adapter $db)

- Zend_Db_Adapter $db: A Zend_Db_Adapter object.

Constructor __construct (line 97)

Constructor.

- access: public

Zend_Db_Table __construct ([array $config = null])

- array $config: Array of user-specified config options.

delete (line 265)

Deletes existing rows.

The WHERE clause must be in native (underscore) format.

- return: The number of rows deleted.
- access: public

int delete (string $where)

- string $where: An SQL WHERE clause.

fetchAll (line 312)

Fetches all rows.

Honors the Zend_Db_Adapter fetch mode.

- return: The row results per the Zend_Db_Adapter fetch mode.
- access: public

mixed fetchAll ([string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])

- string|array $where: An SQL WHERE clause.
- string|array $order: An SQL ORDER clause.
- int $count: An SQL LIMIT count.
- int $offset: An SQL LIMIT offset.

fetchNew (line 345)

Fetches a new blank row (not from the database).

- access: public

Zend_Db_Table_Row fetchNew ()
fetchRow (line 331)

Fetches one row.

Honors the Zend_Db_Adapter fetch mode.

- return: The row results per the Zend_Db_Adapter fetch mode.
- access: public

mixed fetchRow ([string|array $where = null], [string|array $order = null])

- string|array $where: An SQL WHERE clause.
- string|array $order: An SQL ORDER clause.

find (line 283)

Fetches rows by primary key.

- return: Row(s) which matched the primary key value.
- access: public

array find (scalar|array $val)

- scalar|array $val: The value of the primary key.

getAdapter (line 153)

Gets the Zend_Db_Adapter for this particular Zend_Db_Table object.

- access: public

void getAdapter ()
info (line 205)

Returns table information.

- access: public

array info ()
insert (line 230)

Inserts a new row.

Columns must be in underscore format.

- return: The last insert ID.
- access: public

int insert ( &$data, array $data, string $where)

- array $data: Column-value pairs.
- string $where: An SQL WHERE clause.
- &$data

update (line 248)

Updates existing rows.

Columns must be in underscore format.

- return: The number of rows updated.
- access: public

int update ( &$data, string $where, array $data)

- array $data: Column-value pairs.
- string $where: An SQL WHERE clause.
- &$data

_fetch (line 367)

Support method for fetching rows.

- return: The row results per the Zend_Db_Adapter fetch mode.
- access: protected

mixed _fetch (string $type, [string|array $where = null], [string|array $order = null], [int $count = null], [int $offset = null])

- string $type: Whether to fetch 'all' or 'row'.
- string|array $where: An SQL WHERE clause.
- string|array $order: An SQL ORDER clause.
- int $count: An SQL LIMIT count.
- int $offset: An SQL LIMIT offset.

_getDefaultAdapter (line 144)

Gets the default Zend_Db_Adapter for all Zend_Db_Table objects.

- access: protected

void _getDefaultAdapter ()
_setup (line 163)

Populate static properties for this table module.

- access: protected

void _setup ()

Documentation generated on Sun, 29 Oct 2006 21:27:34 -0600 by phpDocumentor 1.3.0RC6