note 124435 deleted from function.join by salathe
| From: | salathe@php.net | Date: | Tue, 26 Nov 2019 12:28:40 +0000 |
| Subject: | note 124435 deleted from function.join by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213254@lists.php.net to get a copy of this message | ||
Note Submitter: erdaceylan25 at gmail dot com
----
https://github.com/erdalceylan/array-join
<?php
$instance = \ArrayJoin\Builder::newInstance()
->select("a.id", "a.nick", "b.item")
->from($users, "a")
->innerJoin($items, "b", new \ArrayJoin\On("a.id = b.user_id"))
->setFetchType(\ArrayJoin\Builder::FETCH_TYPE_ARRAY)
->offset(1)
->limit(2);
$instance->execute();
//output
array (
array ('id' => 1,'nick' => 'erdal','item' =>
'çorap',),
array ('id' => 1,'nick' => 'erdal','item' =>
'çorap',)
);