{"action":"closed","issue":{"url":"https://api.github.com/repos/phalcon/docs/issues/325","labels_url":"https://api.github.com/repos/phalcon/docs/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/docs/issues/325/comments","events_url":"https://api.github.com/repos/phalcon/docs/issues/325/events","html_url":"https://github.com/phalcon/docs/issues/325","id":26268085,"number":325,"title":"Error in the last example of PHQL / Joins ","user":{"login":"ianbytchek","id":1086845,"avatar_url":"https://avatars.githubusercontent.com/u/1086845?v=3","gravatar_id":"","url":"https://api.github.com/users/ianbytchek","html_url":"https://github.com/ianbytchek","followers_url":"https://api.github.com/users/ianbytchek/followers","following_url":"https://api.github.com/users/ianbytchek/following{/other_user}","gists_url":"https://api.github.com/users/ianbytchek/gists{/gist_id}","starred_url":"https://api.github.com/users/ianbytchek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianbytchek/subscriptions","organizations_url":"https://api.github.com/users/ianbytchek/orgs","repos_url":"https://api.github.com/users/ianbytchek/repos","events_url":"https://api.github.com/users/ianbytchek/events{/privacy}","received_events_url":"https://api.github.com/users/ianbytchek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-01-24T20:19:16Z","updated_at":"2015-08-05T13:26:53Z","closed_at":"2015-08-05T13:26:53Z","body":"I'm trying to find a way to generate sql from phql, so far without luck. The last example in [PHQL#Joins](http://docs.phalconphp.com/en/latest/reference/phql.html#joins) says that:\r\n\r\n```\r\n$phql = 'SELECT Brands.name, Songs.name FROM Artists ' .\r\n        'JOIN Songs WHERE Artists.genre = \"Trip-Hop\"';\r\n$result = $this->modelsManager->query($phql);\r\n```\r\nProduce the following SQL in MySQL:\r\n```\r\nSELECT `brands`.`name`, `songs`.`name` FROM `artists`\r\nINNER JOIN `albums` ON `albums`.`artists_id` = `artists`.`id`\r\nINNER JOIN `songs` ON `albums`.`songs_id` = `songs`.`id`\r\nWHERE `artists`.`genre` = 'Trip-Hop'\r\n```\r\n\r\nDoes it demonstrate what happens in MySql or does it actually sets $result value to that string? \r\n\r\nThe error seems to be the missing `query` method, perhaps the `executeQuery` was meant?\r\n"}}