Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Anyone study the files of example site album-o-rama?I got lost.

Anyone study the files of example site* album-o-rama*? I got lost in the file album-o-rama\apps\frontend\controllers\IndexController.php. Don't know when did the author defined the"al","ar","ap".

$phql = 'SELECT
al.id,
al.name,
ar.uri,
ar.id as artist_id,
ar.name as artist,
ap.url
FROM AlbumOrama\Models\Albums al
JOIN AlbumOrama\Models\Artists ar
JOIN AlbumOrama\Models\AlbumsPhotos ap
WHERE
al.id >= '.($offset * 30).' AND
ap.type = "large"
ORDER BY al.playcount DESC
LIMIT 30';
$albums = $this->modelsManager->executeQuery($phql);

$this->view->setVar('albums', $albums);


4.6k
Accepted
answer
FROM AlbumOrama\Models\Albums al
JOIN AlbumOrama\Models\Artists ar
JOIN AlbumOrama\Models\AlbumsPhotos ap

Line 10 11 and 12 ! It's an alias for the join



6.6k

Thank you very much.