Skip to content

Instantly share code, notes, and snippets.

@settermjd
Created June 6, 2018 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save settermjd/c1aadd2092e985ab1d982d9098552763 to your computer and use it in GitHub Desktop.
Save settermjd/c1aadd2092e985ab1d982d9098552763 to your computer and use it in GitHub Desktop.
zend-db-sql join example
<?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