Cts_Db_Table_Abstract

Summary
Cts_Db_Table_Abstract
AuthorJaybill McCarthy
Licensehttp://communit.as/docs/license
See Also
Constructors
Cts_Db_Table_AbstractCalls the parent’s constructor and instantiates a logger.
Instance Methods
getCountByWhereClauseGets a count of records using the supplied where clause.
updateUpdates the table with the supplied data array.

Author

Jaybill McCarthy

See Also

  • Zend_Db_Table

Constructors

Cts_Db_Table_Abstract

function Cts_Db_Table_Abstract($config =  null)

Calls the parent’s constructor and instantiates a logger.  Also sets up a DB adapter and the _cts_plugin variable.

Arguments

config (optional)TBD

Instance Methods

getCountByWhereClause

public function getCountByWhereClause($whereclause =  null)

Gets a count of records using the supplied where clause.

Arguments

whereclause (optional)A string with your where clause in it.  The word “where” is not needed.  If you provide no where clause, a count of all rows will be returned.

Returns

An integer representing the total number of records for that where clause.

update

public function update(array $data,
 $where)

Updates the table with the supplied data array.  You must supply a where clause if you want to limit what gets updated, otherwise all rows will get the update.

Arguments

dataAn array with a key-value pair for each column in the table.
whereA where clause string to limit the rows that get updated.  If the where clause is empty, all rows will be updated with the data argument.

Returns

TBD

function Cts_Db_Table_Abstract($config =  null)
Calls the parent’s constructor and instantiates a logger.
public function getCountByWhereClause($whereclause =  null)
Gets a count of records using the supplied where clause.
public function update(array $data,
 $where)
Updates the table with the supplied data array.
Close