1 # mixed pq\Gateway\Table::by(pq\Gateway\Row $me, string $foreign[, $order = NULL[, int $limit = 0[, int $offset = 0]]])
3 Find rows in another table by foreign key.
4 See pq\Gateway\Table::find(), pq\Gateway\Table::of() and pq\Gateway\Row::ofWhich().
9 A row of this table referenced by another table through a foreign key.
10 * Optional string $name = NULL
11 The identifying name of the relation.
12 * Optional string $order = NULL
14 * Optional int $limit = 0
16 * Optional int $offset = 0
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 $account_emails = new Table("account_emails");
34 $email = $account_emails->find(["email=" => "mike@php.net"])->current();
36 $account = $account_emails->by($email, "account")->current();