1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Fixed syntax error

This commit is contained in:
Phxntxm 2016-07-15 10:13:11 -05:00
parent 824715fbd1
commit 249dac9666

View file

@ -107,9 +107,9 @@ class Mod:
result = cursor.fetchone()
if result is None:
#Server's data doesn't exist yet, need to create it
sql = "create table %s (`server_id` varchar(255) not null,`command` varchar(32) not null,"
sql = "create table `{}` (`server_id` varchar(255) not null,`command` varchar(32) not null,"
"`perms` varchar(32) not null,primary key (`server_id`)) engine=InnoDB default charset=utf8 collate=utf8_bin"
cursor.execute(sql, (ctx.message.server.id,))
cursor.execute(sql.format(ctx.message.server.id))
cursor.execute("insert into %s (server_id, command, perms) values(%s, %s, %s)",(ctx.message.server.id,ctx.message.server.id,command,perms))
else:
cursor.execute("select perms from %s where command=%s",(ctx.message.server.id,command))