DBSqlBuilderUpdate Class Reference
[Model]
Build an update query. More...
Inheritance diagram for
DBSqlBuilderUpdate:
Protected Member Functions |
|
get_fields_values ($arr_fields, IDBTable $table) | |
get_limit ($arr_limit) | |
get_sql_template () | |
get_substitutes () |
Detailed Description
Build an update query.
Definition at line 8 of file dbsqlbuilder.update.cls.php.
Member Function Documentation
DBSqlBuilderUpdate::get_fields_values | ( | $ | arr_fields, | |
IDBTable $ | table | |||
) | [protected] |
Definition at line 25 of file dbsqlbuilder.update.cls.php.
00025 { 00026 $fields = array(); 00027 foreach($arr_fields as $column => $value) { 00028 $fieldname = $this->prefix_column($column, $table); 00029 $fields[$fieldname] = DB::format($value, $table, $column);; 00030 } 00031 return Arr::implode(', ', $fields, ' = '); 00032 }
DBSqlBuilderUpdate::get_limit | ( | $ | arr_limit | ) | [protected] |
Reimplemented from DBSqlBuilderBase.
Definition at line 35 of file dbsqlbuilder.update.cls.php.
DBSqlBuilderUpdate::get_sql_template | ( | ) | [protected] |
Reimplemented from DBSqlBuilderBase.
Definition at line 9 of file dbsqlbuilder.update.cls.php.
DBSqlBuilderUpdate::get_substitutes | ( | ) | [protected] |
Reimplemented from DBSqlBuilderBase.
Definition at line 13 of file dbsqlbuilder.update.cls.php.
00013 { 00014 $ret = array( 00015 '%!fields_values' => $this->get_fields_values($this->fields, $this->query->get_table()), 00016 '%!table' => $this->get_table_and_alias($this->query->get_table()), 00017 '%where' => $this->get_where($this->query->get_wheres()), 00018 '%ignore' => $this->get_feature_sql($this->params, 'ignore', 'IGNORE'), 00019 '%limit' => $this->get_limit(Arr::get_item($this->params, 'limit', array(0,0))), 00020 '%order_by' => $this->get_order_by(Arr::get_item($this->params, 'order_by', array())) 00021 ); 00022 return $ret; 00023 }
The documentation for this class was generated from the following file:
- gyro/core/model/base/sqlbuilder/dbsqlbuilder.update.cls.php