Created
June 6, 2018 13:16
-
-
Save settermjd/c1aadd2092e985ab1d982d9098552763 to your computer and use it in GitHub Desktop.
zend-db-sql join example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// other setup code... | |
$select | |
->where([ | |
'id = ?' => $userId | |
]) | |
->join( | |
['r' => 'tblroles'], | |
'r.userid = tbluser.id', | |
[ | |
'role' | |
], | |
Select::JOIN_INNER | |
); | |
print $select->getSqlString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment