Mercurial > hg > egg-tcls
changeset 43:965b728c2a9d
Delete the votes/ratings too, when deleting a quote.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Sep 2011 14:06:01 +0300 |
parents | 6f8d699fe03f |
children | f0694e61ae45 |
files | quotedb.tcl |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/quotedb.tcl Wed Sep 07 08:03:42 2011 +0300 +++ b/quotedb.tcl Wed Sep 07 14:06:01 2011 +0300 @@ -181,6 +181,10 @@ if {![qdb_sql_exec $upublic $unick $uchan $usql]} { return 0 } else { + set usql "DELETE FROM ${utable}_votes WHERE urlid=$quoteID" + if {![qdb_sql_exec $upublic $unick $uchan $usql]} { + return 0 + } qdb_msg $upublic $unick $uchan "$utable ID #$quoteID poistettu." return 1 }