.

DBTableSubquery Class Reference
[Model]

Masks a sub query as a table, that can be used in Joins. More...

Inheritance diagram for DBTableSubquery:
DBTable IDBTable

List of all members.

Public Member Functions

  __construct ($query, $alias, $table=null)
  Constructor.
  get_table_name_escaped ()
  Returns name of table, but escaped.

Protected Attributes

  $query
  The query to mask as table.

Detailed Description

Masks a sub query as a table, that can be used in Joins.

Author:
Gerd Riesselmann

Definition at line 8 of file dbtablesubquery.csl.php.


Constructor & Destructor Documentation

DBTableSubquery::__construct ( query,
alias,
table = null  
)

Constructor.

Parameters:
IDBTable  $table The table to overload alias for
string  $alias

Definition at line 20 of file dbtablesubquery.csl.php.

00020                                                                    {
00021                 $this->query = $query;
00022                 
00023                 $fields = array();
00024                 if ($table instanceof IDBTable) {
00025                         $fields = $table->get_table_fields();
00026                 }
00027                 parent::__construct($alias, $fields);
00028         }

Member Function Documentation

DBTableSubquery::get_table_name_escaped (  ) 

Returns name of table, but escaped.

Returns:
string

Reimplemented from DBTable.

Definition at line 35 of file dbtablesubquery.csl.php.

00035                                                  {
00036                 return '(' . $this->query . ')';
00037         }

Member Data Documentation

DBTableSubquery::$query [protected]

The query to mask as table.

Definition at line 12 of file dbtablesubquery.csl.php.


The documentation for this class was generated from the following file: