Created
June 4, 2018 01:50
-
-
Save rsandrade/d55aff0b9ba83ca08821329a8d5b679e to your computer and use it in GitHub Desktop.
LIMIT e OFFSET em LEFT JOIN
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
$f3->set('res_institutions', $f3->get('db')->exec( | |
'SELECT Institutions.id, Institutions.name, Institutions.country, Users_Institutions.id AS iduserinst FROM Institutions ' . | |
'LEFT JOIN Users_Institutions ON Users_Institutions.iduser = ' . $f3->get('SESSION.id')[0]['id'] . ' ' . | |
'AND Users_Institutions.idinstitution = ' . $f3->get('PARAMS.id') . ' ' . | |
'LIMIT ' . $f3->get('GET.qty') . ' ' . | |
'OFFSET ' . $f3->get('GET.since') | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment