/** * Returns the field list from Select object * * @return string The field list */ public function getFields() { $joins = $this->_sql->getJoins(); $fields = $this->_sql->getFields(); if (!is_array($fields)) { return $fields; } if (count($joins) > 0 && $this->_sql->prefixTableName) { $table = $this->_sql->getTableName(); foreach ($fields as $key => $field) { $fields[$key] = "{$table}.{$field}"; } } return implode(', ', $fields); }
/** * Returns the SQL query string for current Select SQL Object * * @return String The SQL query string */ public function getStatement() { return trim(sprintf($this->_insert, $this->_sql->getTableName(), $this->getColumns(), $this->getValues())); }
/** * Returns the SQL query string for current Select SQL Object * * @return String The SQL query string */ public function getStatement() { return trim(sprintf($this->_delete, $this->_sql->getTableName(), $this->getWhere())); }
/** * Returns the SQL query string for current Select SQL Object * * @return String The SQL query string */ public function getStatement() { return trim(str_replace(array('<tableName>', '<definition>', '<options>'), array($this->_sql->getTableName(), $this->getDefinitions(), $this->getOptions()), $this->_template)); }