From dc7ed5c54058d5bfccfd8216d065f790b4dc11c0 Mon Sep 17 00:00:00 2001 From: Navarr Barnier Date: Wed, 18 Apr 2018 08:32:30 -0400 Subject: [PATCH] Add expanded documentation to AdapterInterface::update This adds a long description to AdapterInterface::update detailing how the `$where` parameter works --- .../Magento/Framework/DB/Adapter/AdapterInterface.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php index 5cba5bd3e8058..c1be8bcbfbe62 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php +++ b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php @@ -492,6 +492,13 @@ public function insertForce($table, array $bind); /** * Updates table rows with specified data based on a WHERE clause. * + * The $where parameter in this instance can be a single WHERE clause or an array containing a multiple. In all + * instances, a WHERE clause can be a string or an instance of {@see Zend_Db_Expr}. In the event you use an array, + * you may specify the clause as the key and a value to be bound to it as the value. E.g., ['amt > ?' => $amt] + * + * If the $where parameter is an array of multiple clauses, they will be joined by AND, with each clause wrapped in + * parenthesis. If you wish to use an OR, you must give a single clause that is an instance of {@see Zend_Db_Expr} + * * @param mixed $table The table to update. * @param array $bind Column-value pairs. * @param mixed $where UPDATE WHERE clause(s).