[plug] neato little mailman moderation script
James Devenish
devenish at guild.uwa.edu.au
Sun Sep 19 19:45:29 WST 2004
In message <Pine.LNX.4.44.0409191918370.5997-100000 at guild.murdoch.edu.au>
on Sun, Sep 19, 2004 at 07:28:42PM +0800, Shayne O'Neill wrote:
> cr.execute (""" SELECT * FROM modmessages WHERE list='""" + listname + """'""")
[...]
> list.HandleRequest(tuple[1],tuple[5])
Be extremely cautious of such motifs. If you ever change your table,
that code could fail. If I understand correctly, it is better to do:
> cr.execute (""" SELECT idno, moderation FROM modmessages WHERE list='""" + listname + """'""")
[...]
> list.HandleRequest(tuple[0],tuple[1])
PS. This post constitutes a "correction" and is somewhat "brief", but
please be advised that it is not intended to be "rude", "anti-social" or
"off-topic" (even though it deals exclusively with Python and SQL, not
Linux).
More information about the plug
mailing list