Skip to content

Commit dc7ed5c

Browse files
committed
Add expanded documentation to AdapterInterface::update
This adds a long description to AdapterInterface::update detailing how the `$where` parameter works
1 parent 70bd853 commit dc7ed5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,13 @@ public function insertForce($table, array $bind);
492492
/**
493493
* Updates table rows with specified data based on a WHERE clause.
494494
*
495+
* The $where parameter in this instance can be a single WHERE clause or an array containing a multiple. In all
496+
* instances, a WHERE clause can be a string or an instance of {@see Zend_Db_Expr}. In the event you use an array,
497+
* you may specify the clause as the key and a value to be bound to it as the value. E.g., ['amt > ?' => $amt]
498+
*
499+
* If the $where parameter is an array of multiple clauses, they will be joined by AND, with each clause wrapped in
500+
* parenthesis. If you wish to use an OR, you must give a single clause that is an instance of {@see Zend_Db_Expr}
501+
*
495502
* @param mixed $table The table to update.
496503
* @param array $bind Column-value pairs.
497504
* @param mixed $where UPDATE WHERE clause(s).

0 commit comments

Comments
 (0)