UPDATEstatementsyntax:<code>UPDATE//component_name//SET//col_name1//=//expr1// [, //col_name2//=//expr2// ...][WHERE//where_condition//][ORDERBY...][LIMIT//record_count//]</code>*TheUPDATEstatementupdatescolumnsofexistingrecordsin//component_name// with new values and returns the number of affected records.*TheSETclauseindicateswhichcolumnstomodifyandthevaluestheyshouldbegiven.*TheoptionalWHEREclausespecifiestheconditionsthatidentifywhichrecordstoupdate.WithoutWHEREclause,allrecordsareupdated.*TheoptionalORDERBYclausespecifiestheorderinwhichtherecordsarebeingupdated.*TheLIMITclauseplacesalimitonthenumberofrecordsthatcanbeupdated.YoucanuseLIMITrow_counttorestrictthescopeoftheUPDATE.ALIMITclauseisa**rows-matchedrestriction**notarows-changedrestriction.Thestatementstopsassoonasithasfound//record_count// rows that satisfy the WHERE clause, whether or not they actually were changed.<codetype="php">$q='UPDATE Account SET amount = amount + 200 WHERE id > 200';$rows=$this->conn->query($q);// the same query using the query interface$q=newDoctrine_Query();$rows=$q->update('Account')->set('amount','amount + 200')->where('id > 200')->execute();print$rows;// the number of affected rows</code>