Lines Matching refs:alias

13     /** @var array (alias -> statement */
15 /** @var array (alias -> statement) */
17 /** @var array (alias -> "table"|"join") keeps how tables were added, as table or join */
37 * If the alias already exists, the current statement for that alias will be overwritten.
41 * @param string $alias Under whichname to slect the column. blank for column name
43 public function addSelectColumn($tablealias, $column, $alias = '')
45 if ($alias === '') $alias = $column;
49 $this->select[$alias] = "$tablealias.$column";
56 * @param string $alias
61 * If the alias already exists, the current statement for that alias will be overwritten.
64 public function addSelectStatement($statement, $alias)
66 $this->select[$alias] = $statement;
70 * Return an already defined column selection statement based on the alias
72 * @param string $alias
74 * @throws StructException when the alias does not exist
76 public function getSelectStatement($alias)
78 if (!isset($this->select[$alias])) {
79 throw new StructException('No such select alias');
82 return $this->select[$alias];
89 * @param string $alias alias for the table, blank for table name
91 public function addTable($table, $alias = '')
93 if ($alias === '') $alias = $table;
94 if (isset($this->from[$alias])) {
97 $this->from[$alias] = "$table AS $alias";
98 $this->type[$alias] = 'table';
104 * @param string $leftalias the alias of the left table you're joining on, has to exist already
106 * @param string $rightalias an alias for the right table, blank for table name
192 * Creates a new table alias that has not been used before
194 * @param string $prefix the prefix for the alias, helps with readability of the SQL
213 foreach ($this->from as $alias => $statement) {
214 if ($this->type[$alias] == 'table' && $from) {
225 foreach ($this->select as $alias => $select) {
226 $selects[] = "$select AS $alias";