Fixed syntax error
This commit is contained in:
parent
e9f5c88482
commit
a12f8ca10b
|
@ -108,9 +108,8 @@ class Mod:
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
if result is None:
|
if result is None:
|
||||||
#Server's data doesn't exist yet, need to create it
|
#Server's data doesn't exist yet, need to create it
|
||||||
sql = "create table `{}` (`command` varchar(32) not null,`perms` varchar(32) not null,"
|
sql = "create table `"+ctx.message.server.id+"` (`command` varchar(32) not null,`perms` varchar(32) not null,primary key (`command`)) engine=InnoDB default charset=utf8 collate=utf8_bin"
|
||||||
"primary key (`command`)) engine=InnoDB default charset=utf8 collate=utf8_bin"
|
cursor.execute(sql)
|
||||||
cursor.execute(sql.format(ctx.message.server.id))
|
|
||||||
cursor.execute("insert into {} (command, perms) values({}, {})",(ctx.message.server.id,command,perms))
|
cursor.execute("insert into {} (command, perms) values({}, {})",(ctx.message.server.id,command,perms))
|
||||||
else:
|
else:
|
||||||
cursor.execute("select perms from %s where command=%s",(ctx.message.server.id,command))
|
cursor.execute("select perms from %s where command=%s",(ctx.message.server.id,command))
|
||||||
|
|
Loading…
Reference in a new issue