Created
May 7, 2013 15:45
-
-
Save jaguerra/5533655 to your computer and use it in GitHub Desktop.
RAW result query on Extbase
This file contains hidden or 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 | |
function findRaw(){ | |
$localQuery = $this->createQuery(); | |
$storagePageIds = $localQuery->getQuerySettings()->getStoragePageIds(); | |
$querySettings = $localQuery->getQuerySettings(); | |
$querySettings->setReturnRawQueryResult(TRUE); | |
$localQuery->setQuerySettings( $querySettings ); | |
$localQuery->statement('select mm2.uid_foreign as ea, cl.uid as cl '. | |
' from tx_extension_domain_model_courselevels cl '. | |
' inner join tx_extension_serie_courselevels_mm mm on mm.uid_foreign = cl.uid '. | |
' inner join tx_extension_serie_educationalarea_mm mm2 on mm.uid_local = mm2.uid_local '. | |
' inner join tx_extension_domain_model_educationalarea ea on mm2.uid_foreign = ea.uid '. | |
' where cl.new != 0 '. | |
' AND cl.pid IN (' . implode(', ', $storagePageIds) . ') '. | |
' AND ea.pid IN (' . implode(', ', $storagePageIds) . ') '. | |
'order by ea.sorting, cl.sorting '); | |
$result = $localQuery->execute(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment