From d1bbd452d2c78993adf55d1933b2879ff108949d Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Fri, 15 Jul 2016 11:22:40 -0500 Subject: [PATCH] Fixed syntax error --- cogs/mod.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/mod.py b/cogs/mod.py index 77179f6..7cb8ec8 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -112,7 +112,8 @@ class Mod: cursor.execute(sql) cursor.execute("insert into {} (command, perms) values({}, {})",(ctx.message.server.id,command,permissions)) else: - cursor.execute("select perms from `%s` where command=%s",(ctx.message.server.id,command)) + sql = "select perms from `{}` where command=%s".format(ctx.message.server.id) + cursor.execute(sql, (command,)) if cursor.fetchone() is None: cursor.execute("insert into {} (command, perms) values({}, {})",(ctx.message.server.id,command,permissions)) else: