{"action":"created","issue":{"url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/2711","repository_url":"https://api.github.com/repos/HGustavs/LenaSYS","labels_url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/2711/labels{/name}","comments_url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/2711/comments","events_url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/2711/events","html_url":"https://github.com/HGustavs/LenaSYS/issues/2711","id":219247042,"number":2711,"title":"Faulty SQL-query in resultedservice.php","user":{"login":"a15eriho","id":26706624,"avatar_url":"https://avatars0.githubusercontent.com/u/26706624?v=3","gravatar_id":"","url":"https://api.github.com/users/a15eriho","html_url":"https://github.com/a15eriho","followers_url":"https://api.github.com/users/a15eriho/followers","following_url":"https://api.github.com/users/a15eriho/following{/other_user}","gists_url":"https://api.github.com/users/a15eriho/gists{/gist_id}","starred_url":"https://api.github.com/users/a15eriho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a15eriho/subscriptions","organizations_url":"https://api.github.com/users/a15eriho/orgs","repos_url":"https://api.github.com/users/a15eriho/repos","events_url":"https://api.github.com/users/a15eriho/events{/privacy}","received_events_url":"https://api.github.com/users/a15eriho/received_events","type":"User","site_admin":false},"labels":[{"id":350523439,"url":"https://api.github.com/repos/HGustavs/LenaSYS/labels/Group-3","name":"Group-3","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"a15eriho","id":26706624,"avatar_url":"https://avatars0.githubusercontent.com/u/26706624?v=3","gravatar_id":"","url":"https://api.github.com/users/a15eriho","html_url":"https://github.com/a15eriho","followers_url":"https://api.github.com/users/a15eriho/followers","following_url":"https://api.github.com/users/a15eriho/following{/other_user}","gists_url":"https://api.github.com/users/a15eriho/gists{/gist_id}","starred_url":"https://api.github.com/users/a15eriho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a15eriho/subscriptions","organizations_url":"https://api.github.com/users/a15eriho/orgs","repos_url":"https://api.github.com/users/a15eriho/repos","events_url":"https://api.github.com/users/a15eriho/events{/privacy}","received_events_url":"https://api.github.com/users/a15eriho/received_events","type":"User","site_admin":false},"assignees":[{"login":"a15eriho","id":26706624,"avatar_url":"https://avatars0.githubusercontent.com/u/26706624?v=3","gravatar_id":"","url":"https://api.github.com/users/a15eriho","html_url":"https://github.com/a15eriho","followers_url":"https://api.github.com/users/a15eriho/followers","following_url":"https://api.github.com/users/a15eriho/following{/other_user}","gists_url":"https://api.github.com/users/a15eriho/gists{/gist_id}","starred_url":"https://api.github.com/users/a15eriho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a15eriho/subscriptions","organizations_url":"https://api.github.com/users/a15eriho/orgs","repos_url":"https://api.github.com/users/a15eriho/repos","events_url":"https://api.github.com/users/a15eriho/events{/privacy}","received_events_url":"https://api.github.com/users/a15eriho/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-04-04T13:16:45Z","updated_at":"2017-04-05T06:13:28Z","closed_at":null,"body":"A faulty SQL-query in the resultedservice.php makes the result page throw an error when loading if the mysql server is of a later version. This is due to stricter control of SQL-queries in later versions.\r\n\r\nThis can be fixed by reconfigure the mysql-service (not a good option), or by modifying the SQL-query (a good option to secure the LenaSYS-system for a more compatible future)"},"comment":{"url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/comments/291764397","html_url":"https://github.com/HGustavs/LenaSYS/issues/2711#issuecomment-291764397","issue_url":"https://api.github.com/repos/HGustavs/LenaSYS/issues/2711","id":291764397,"user":{"login":"a15eriho","id":26706624,"avatar_url":"https://avatars0.githubusercontent.com/u/26706624?v=3","gravatar_id":"","url":"https://api.github.com/users/a15eriho","html_url":"https://github.com/a15eriho","followers_url":"https://api.github.com/users/a15eriho/followers","following_url":"https://api.github.com/users/a15eriho/following{/other_user}","gists_url":"https://api.github.com/users/a15eriho/gists{/gist_id}","starred_url":"https://api.github.com/users/a15eriho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a15eriho/subscriptions","organizations_url":"https://api.github.com/users/a15eriho/orgs","repos_url":"https://api.github.com/users/a15eriho/repos","events_url":"https://api.github.com/users/a15eriho/events{/privacy}","received_events_url":"https://api.github.com/users/a15eriho/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T06:13:28Z","updated_at":"2017-04-05T06:13:28Z","body":"The faulty query was in file 'resultedservice.php':\r\n$query = $pdo->prepare(\"SELECT listentries.*,quizFile,variant.vid as qvariant FROM listentries LEFT JOIN quiz ON  listentries.link=quiz.id LEFT JOIN variant ON quiz.id=variant.quizID WHERE listentries.cid=:cid and listentries.vers=:vers and (listentries.kind=3 or listentries.kind=4) GROUP BY lid ORDER BY pos;\");\r\n\r\nThe error produced were (database name was \"grupp03\"):\r\n\r\n\"Error retreiving moments and duggas. (row 276) 0 row(s) were found. Error code: Expression #16 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'grupp03.variant.vid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by\"\r\n\r\nFix was to modify to **COUNT(**variant.vid**)**. Previous version of mysql seems to not be as strict with this."}}
{"actor":{"display_login":"a15eriho"}}