Mercurial > hg > egg-tcls
comparison tj.tcl @ 638:5260156d9521
tj: Oops, forgot to use LIKE instead of '=' here for comparing uid. Fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Feb 2021 12:30:07 +0200 |
parents | 2f62fa434056 |
children | c11ee9fea4b8 |
comparison
equal
deleted
inserted
replaced
637:2f62fa434056 | 638:5260156d9521 |
---|---|
469 # If given ID is empty or *, clear to global default id | 469 # If given ID is empty or *, clear to global default id |
470 if {$uid == "" || $uid == "{}" || $uid == "*"} { | 470 if {$uid == "" || $uid == "{}" || $uid == "*"} { |
471 set uid $tj_default_id | 471 set uid $tj_default_id |
472 } else { | 472 } else { |
473 # Check if a TJ exists with this id? | 473 # Check if a TJ exists with this id? |
474 set usql "SELECT COUNT(*) FROM tj WHERE uuser='[utl_escape $uhand]' AND uid='[utl_escape $uid]'" | 474 set usql "SELECT COUNT(*) FROM tj WHERE uuser='[utl_escape $uhand]' AND uid LIKE '[utl_escape $uid]'" |
475 if {[catch {set nids [tj_dbh onecolumn $usql]} uerrmsg]} { | 475 if {[catch {set nids [tj_dbh onecolumn $usql]} uerrmsg]} { |
476 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg] | 476 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg] |
477 tj_log "$uerrmsg on SQL:\n$usql" | 477 tj_log "$uerrmsg on SQL:\n$usql" |
478 return 1 | 478 return 1 |
479 } | 479 } |