I am extremely new to postgres (just started up about 30 minutes to an hour ago) and I am already stuck on an error ((node:33564) UnhandledPromiseRejectionWarning: error: syntax error at or near "end").
Currently, I am making a giveaway system for a Discord bot, and I would like the giveaways to still persist even if the bot restarts, which led me to turn to postgres for a database.
This is the code I attempted to use to add a giveaway to the database.
client.query(`INSERT INTO discord.giveaways (content, end, channel, winners, message) VALUES($1, $2, $3, $4, $5)`, [content, end, channel, winners, message]); This code returns the following error: (node:33564) UnhandledPromiseRejectionWarning: error: syntax error at or near "end" upon being called.
The value of each variables are the following:
[ 'hello', 1550518888972, '539577989197856776', 1, '547140492039684097' ] The columns of the discord.giveaways schema: 