1 # mixed pq\Gateway\Table::find([array $where = NULL[, string $order = NULL[, int $limit = 0[, int $offset = 0[, string $lock = NULL]]]]])
3 Find rows in the table.
4 See pq\Gateway\Table::execute() and pq\Gateway\Table::onResult().
8 * Optional array $where = NULL
10 * Optional string $order = NULL
12 * Optional int $limit = 0
14 * Optional int $offset = 0
16 * Optional string $lock = NULL
17 A FOR lock clause (SHARE/UPDATE/KEY SHARE/NO KEY UPDATE).
21 * a [deferred promise of React/Promise](https://github.com/reactphp/promise#deferred-1), when using pq\Query\AsyncExecutor, the asynchronous executor.
23 * pq\Result, if pq\Result::$status != pq\Result::TUPLES_OK.
24 * pq\Result, if the rowset prototype pq\Gateway\Table::$rowset is empty.
25 * pq\Gateway\Rowset, an instance of the rowset prototype.
33 $table = new Table("account_email");
34 $transaction = $table->getConnection()->startTransaction();
36 $rowset = $table->find(["email=" => "mike@php.net"], null, 0, 0, "UPDATE");
38 $rowset->apply(function(pq\Gateway\Row $row) {
39 $row->email = "mike@PHP.net";
42 $rowset->update(false);
43 $transaction->commit();