diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-12-15 12:44:04 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-12-15 12:44:04 -0500 |
commit | 67f1247fec7d65744b56605f617aa0cc5b466bca (patch) | |
tree | e4b5c312bbe398b1fdb01a57a884a2789f03c51d /libBasicTableOperations.tcl | |
parent | fbd164691985a646c1be9c57b01c34e59173a2d2 (diff) | |
download | GradeBook-67f1247fec7d65744b56605f617aa0cc5b466bca.tar.gz GradeBook-67f1247fec7d65744b56605f617aa0cc5b466bca.zip |
safe column selection
Diffstat (limited to 'libBasicTableOperations.tcl')
-rwxr-xr-x | libBasicTableOperations.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
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) |