{"action":"created","issue":{"url":"https://api.github.com/repos/koala-framework/koala-framework/issues/336","labels_url":"https://api.github.com/repos/koala-framework/koala-framework/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/koala-framework/koala-framework/issues/336/comments","events_url":"https://api.github.com/repos/koala-framework/koala-framework/issues/336/events","html_url":"https://github.com/koala-framework/koala-framework/issues/336","id":73541100,"number":336,"title":"SQL queries optimization","user":{"login":"Sogl","id":7556290,"avatar_url":"https://avatars.githubusercontent.com/u/7556290?v=3","gravatar_id":"","url":"https://api.github.com/users/Sogl","html_url":"https://github.com/Sogl","followers_url":"https://api.github.com/users/Sogl/followers","following_url":"https://api.github.com/users/Sogl/following{/other_user}","gists_url":"https://api.github.com/users/Sogl/gists{/gist_id}","starred_url":"https://api.github.com/users/Sogl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sogl/subscriptions","organizations_url":"https://api.github.com/users/Sogl/orgs","repos_url":"https://api.github.com/users/Sogl/repos","events_url":"https://api.github.com/users/Sogl/events{/privacy}","received_events_url":"https://api.github.com/users/Sogl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/koala-framework/koala-framework/labels/Support","name":"Support","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-06T07:26:12Z","updated_at":"2015-07-16T02:40:42Z","closed_at":"2015-05-06T10:24:03Z","body":"Hi!\r\n\r\nAs I can see in querylog, all queries select all rows from database. For example, I need only id, but all 11 columns is selected.\r\n\r\nHow to specify columns? "},"comment":{"url":"https://api.github.com/repos/koala-framework/koala-framework/issues/comments/121807241","html_url":"https://github.com/koala-framework/koala-framework/issues/336#issuecomment-121807241","issue_url":"https://api.github.com/repos/koala-framework/koala-framework/issues/336","id":121807241,"user":{"login":"Sogl","id":7556290,"avatar_url":"https://avatars.githubusercontent.com/u/7556290?v=3","gravatar_id":"","url":"https://api.github.com/users/Sogl","html_url":"https://github.com/Sogl","followers_url":"https://api.github.com/users/Sogl/followers","following_url":"https://api.github.com/users/Sogl/following{/other_user}","gists_url":"https://api.github.com/users/Sogl/gists{/gist_id}","starred_url":"https://api.github.com/users/Sogl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sogl/subscriptions","organizations_url":"https://api.github.com/users/Sogl/orgs","repos_url":"https://api.github.com/users/Sogl/repos","events_url":"https://api.github.com/users/Sogl/events{/privacy}","received_events_url":"https://api.github.com/users/Sogl/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T02:40:42Z","updated_at":"2015-07-16T02:40:42Z","body":">Watch out for proper quotes. ($db->quote())\r\n\r\nWhat do you mean by that?\r\n\r\nUsually I use slash `\\` to screen sting and data values. Like this:\r\n```sql\r\n'... ownerId = ' . $employee->id . ' AND flightDate <= \\'' . $endDateMonth1->format('Y-m-d') . '\\' AND ...\r\n```"}}