mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
Still toying with sql syntax
This commit is contained in:
parent
2db2f64696
commit
9808581d37
@ -106,9 +106,10 @@ class Notes(DBHandler, callbacks.Privmsg):
|
||||
"set a note as unread"
|
||||
noteid = privmsgs.getArgs(args)
|
||||
self.cursor.execute("""UPDATE notes
|
||||
SET read="False"
|
||||
SET read='False'
|
||||
where id = %d""" % int(noteid))
|
||||
self.db.commit()
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
||||
def sendnote(self, irc, msg, args):
|
||||
"sends a new note to an IRC user"
|
||||
@ -126,10 +127,10 @@ class Notes(DBHandler, callbacks.Privmsg):
|
||||
recipID = self.getUserID(recipient)
|
||||
if ircutils.isChannel(msg.args[0]): public = "True"
|
||||
else: public = "False"
|
||||
self.cursor.execute("""INSERT INTO notes
|
||||
VALUES (%d,%d,%d,'False',%s,%s)""" %\
|
||||
(int(senderID), int(recipID), int(time.time()),
|
||||
public, note))
|
||||
self.cursor.execute("""INSERT INTO notes VALUES
|
||||
(NULL, %d, %d, %d, %s, %s, %s)""",
|
||||
int(senderID), int(recipID), time.time(),
|
||||
'False', public, note)
|
||||
self.db.commit()
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user