comparison tj.tcl @ 636:c3911a8c28e5

tj: Oops, in 'set' command UPDATE clause we had forgotten to specify uuser constraint when we converted to using uids instead of unique row ids. Fixed.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Feb 2021 12:29:17 +0200
parents 4fbe70d3b63a
children 2f62fa434056
comparison
equal deleted inserted replaced
635:4fbe70d3b63a 636:c3911a8c28e5
372 if {$rstamp != "invalid"} { 372 if {$rstamp != "invalid"} {
373 lappend usqlargs "utarget='$rdate'" 373 lappend usqlargs "utarget='$rdate'"
374 } 374 }
375 375
376 if {[llength $usqlargs] > 0} { 376 if {[llength $usqlargs] > 0} {
377 set usql "UPDATE tj SET [join $usqlargs ,] WHERE uid LIKE '[utl_escape $uid]'" 377 set usql "UPDATE tj SET [join $usqlargs ,] WHERE uuser='[utl_escape $uhand]' AND uid LIKE '[utl_escape $uid]'"
378 if {[catch {tj_dbh eval $usql} uerrmsg]} { 378 if {[catch {tj_dbh eval $usql} uerrmsg]} {
379 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg] 379 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg]
380 tj_log "$uerrmsg on SQL:\n$usql" 380 tj_log "$uerrmsg on SQL:\n$usql"
381 return 1 381 return 1
382 } 382 }