Example #1
0
 /**
  * Parses UPDATE statement.
  * @return string
  */
 protected function parseUpdateStmt()
 {
     $values = array();
     list($table, $where) = $this->clauses;
     foreach ($this->escapeValue($this->stmt->getValues()) as $col => $value) {
         $values[] = $this->parseFieldName($col) . ' = ' . $value;
     }
     $data = "\nSET " . implode(', ', $values);
     return 'UPDATE ' . $table . $data . $where;
 }