From 67f1247fec7d65744b56605f617aa0cc5b466bca Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sat, 15 Dec 2012 12:44:04 -0500 Subject: safe column selection --- libBasicTableOperations.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libBasicTableOperations.tcl') diff --git a/libBasicTableOperations.tcl b/libBasicTableOperations.tcl index 134dc18..81f85b3 100755 --- a/libBasicTableOperations.tcl +++ b/libBasicTableOperations.tcl @@ -38,7 +38,7 @@ proc colList2sqlColStr { col_list } { proc SelectColvalueFromTable { table column_of_interest col row_value } { # select value of 'column_of_interest' from 'table' where 'col'='row_value' set value {} - set eval_str "SELECT \"$column_of_interest\" FROM \'$table\' WHERE \"$col\"=\"$row_value\"" + set eval_str "SELECT \"$column_of_interest\" FROM \'$table\' WHERE $col=:row_value" set err [catch { db eval $eval_str v { set value $v($column_of_interest) -- cgit v1.2.3