{"action":"created","issue":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/2044","repository_url":"https://api.github.com/repos/mysqljs/mysql","labels_url":"https://api.github.com/repos/mysqljs/mysql/issues/2044/labels{/name}","comments_url":"https://api.github.com/repos/mysqljs/mysql/issues/2044/comments","events_url":"https://api.github.com/repos/mysqljs/mysql/issues/2044/events","html_url":"https://github.com/mysqljs/mysql/issues/2044","id":330824781,"node_id":"MDU6SXNzdWUzMzA4MjQ3ODE=","number":2044,"title":"template strings in insert and update?","user":{"login":"zoobot","id":22104001,"node_id":"MDQ6VXNlcjIyMTA0MDAx","avatar_url":"https://avatars2.githubusercontent.com/u/22104001?v=4","gravatar_id":"","url":"https://api.github.com/users/zoobot","html_url":"https://github.com/zoobot","followers_url":"https://api.github.com/users/zoobot/followers","following_url":"https://api.github.com/users/zoobot/following{/other_user}","gists_url":"https://api.github.com/users/zoobot/gists{/gist_id}","starred_url":"https://api.github.com/users/zoobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoobot/subscriptions","organizations_url":"https://api.github.com/users/zoobot/orgs","repos_url":"https://api.github.com/users/zoobot/repos","events_url":"https://api.github.com/users/zoobot/events{/privacy}","received_events_url":"https://api.github.com/users/zoobot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-08T22:54:19Z","updated_at":"2018-06-08T23:09:50Z","closed_at":null,"author_association":"NONE","body":"hi,\r\nI have been struggling to make template strings work in insert and update queries and wondering if I am just doing it wrong or is it not supported? THANKS for any input.\r\n\r\nhttps://dev.mysql.com/doc/refman/8.0/en/insert.html\r\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\r\n    [INTO] tbl_name\r\n    [PARTITION (partition_name [, partition_name] ...)]\r\n    SET assignment_list\r\n    [ON DUPLICATE KEY UPDATE assignment_list]\r\n\r\nHere's what I was  attempting but could not get to work:\r\nlet query = `INSERT INTO myTAble SET\r\n        myID = ${id},\r\n        name = ${customer_name},\r\n\t email = ${customer_email},\r\n        ON DUPLICATE KEY UPDATE\r\n        name = ${customer_name},\r\n        email = ${customer_email}`;\r\n\r\nAlso tried these to no avail:\r\nquery = `INSERT INTO myTAble SET\r\n        myID = ${id},\r\n        name = ${customer_name},\r\n\t email = ${customer_email}`;\r\n\r\nquery = `UPDATE myTable SET name = ${chargebackData.customer_name}`;"},"comment":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/comments/395916217","html_url":"https://github.com/mysqljs/mysql/issues/2044#issuecomment-395916217","issue_url":"https://api.github.com/repos/mysqljs/mysql/issues/2044","id":395916217,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTkxNjIxNw==","user":{"login":"dougwilson","id":67512,"node_id":"MDQ6VXNlcjY3NTEy","avatar_url":"https://avatars3.githubusercontent.com/u/67512?v=4","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T23:09:50Z","updated_at":"2018-06-08T23:09:50Z","author_association":"MEMBER","body":"When i get to a computer i can provide an example too"}}
{"actor":{"display_login":"dougwilson"}}