{"action":"opened","issue":{"url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1618","labels_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1618/labels{/name}","comments_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1618/comments","events_url":"https://api.github.com/repos/Runalyze/Runalyze/issues/1618/events","html_url":"https://github.com/Runalyze/Runalyze/issues/1618","id":120615740,"number":1618,"title":"Backup tool fails for empty tables","user":{"login":"laufhannes","id":8313118,"avatar_url":"https://avatars.githubusercontent.com/u/8313118?v=3","gravatar_id":"","url":"https://api.github.com/users/laufhannes","html_url":"https://github.com/laufhannes","followers_url":"https://api.github.com/users/laufhannes/followers","following_url":"https://api.github.com/users/laufhannes/following{/other_user}","gists_url":"https://api.github.com/users/laufhannes/gists{/gist_id}","starred_url":"https://api.github.com/users/laufhannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laufhannes/subscriptions","organizations_url":"https://api.github.com/users/laufhannes/orgs","repos_url":"https://api.github.com/users/laufhannes/repos","events_url":"https://api.github.com/users/laufhannes/events{/privacy}","received_events_url":"https://api.github.com/users/laufhannes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Runalyze/Runalyze/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-06T07:24:46Z","updated_at":"2015-12-06T07:24:46Z","closed_at":null,"body":"For example `' WHERE equipmentid IN('.implode(',', $this->fetchEquipmentIDs()).')';` will produce `WHERE equipmentid IN ()`.\r\n\r\n```\r\nFatal error: Uncaught exception 'PDOException' with message\r\n'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1'\r\nin /runalyze/inc/system/class.PDOforRunalyze.php:267\r\nStack trace:\r\n#0 /runalyze/inc/system/class.PDOforRunalyze.php(267): PDO->query('SELECT * FROM `...')\r\n#1 /volume1/web/runalyze/plugin/RunalyzePluginTool_DbBackup/class.RunalyzeBackup.php(108): PDOforRunalyze->query('SELECT * FROM `...')\r\n#2 /runalyze/plugin/RunalyzePluginTool_DbBackup/class.RunalyzeBackup.php(71): RunalyzeBackup->saveTableRows('runalyze_activi...')\r\n#3 ...\r\n```"}}