gyro/core/model/base/queries/dbquery.update.cls.php
Go to the documentation of this file.00001 <?php 00002 require_once dirname(__FILE__) . '/dbquery.ordered.cls.php'; 00003 00004 /** 00005 * An Update Query 00006 * 00007 * @author Gerd Riesselmann 00008 * @ingroup Model 00009 */ 00010 class DBQueryUpdate extends DBQueryOrdered { 00011 /** 00012 * Ignore Errors Policy 00013 */ 00014 const IGNORE = 2; 00015 00016 /** 00017 * Return SQL fragment 00018 * 00019 * @return string 00020 */ 00021 public function get_sql() { 00022 $params = array(); 00023 if ($this->policy & self::IGNORE) { 00024 $params['ignore'] = true; 00025 } 00026 $params['fields'] = $this->fields; 00027 $params['limit'] = $this->get_limit(); 00028 $params['order_by'] = $this->get_orders(); 00029 $builder = DBSqlBuilderFactory::create_builder(DBSqlBuilderFactory::UPDATE, $this, $params); 00030 return $builder->get_sql(); 00031 } 00032 }