Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, not directly, since Zend Framework builds and executes the SQL inside the adapter method Zend_Db_Adapter_Abstract::update:</p> <pre><code>/** * Updates table rows with specified data based on a WHERE clause. * * @param mixed $table The table to update. * @param array $bind Column-value pairs. * @param mixed $where UPDATE WHERE clause(s). * @return int The number of affected rows. */ public function update($table, array $bind, $where = '') { /** * Build "col = ?" pairs for the statement, * except for Zend_Db_Expr which is treated literally. */ $set = array(); foreach ($bind as $col =&gt; $val) { if ($val instanceof Zend_Db_Expr) { $val = $val-&gt;__toString(); unset($bind[$col]); } else { $val = '?'; } $set[] = $this-&gt;quoteIdentifier($col, true) . ' = ' . $val; } $where = $this-&gt;_whereExpr($where); /** * Build the UPDATE statement */ $sql = "UPDATE " . $this-&gt;quoteIdentifier($table, true) . ' SET ' . implode(', ', $set) . (($where) ? " WHERE $where" : ''); /** * Execute the statement and return the number of affected rows */ $stmt = $this-&gt;query($sql, array_values($bind)); $result = $stmt-&gt;rowCount(); return $result; } </code></pre> <p>You can, temporarily, insert a var_dump and exit inside this method to inspect the sql to ensure that it is correct:</p> <pre><code>/** * Build the UPDATE statement */ $sql = "UPDATE " . $this-&gt;quoteIdentifier($table, true) . ' SET ' . implode(', ', $set) . (($where) ? " WHERE $where" : ''); var_dump($sql); exit; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload