aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook_lib.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 42dd708..81a22a4 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -172,7 +172,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
dbg "empty sort col changed to $sort_col" 4
}
# testing for the existense of the sorting column
- set eval_str [list SELECT * FROM GradesTable ORDER BY $sort_col]
+ set eval_str [concat SELECT * FROM GradesTable ORDER BY \"$sort_col\"]
set err [catch {db eval $eval_str } errStat]
if { $err } {
dbg $errStat 3
@@ -222,7 +222,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
}
if { $sql_column_str ne "" } {
# get all allowed columns and rows
- set eval_str [concat SELECT $sql_column_str FROM GradesTable $where_statement ORDER BY $sort_col]
+ set eval_str [concat SELECT $sql_column_str FROM GradesTable $where_statement ORDER BY \"$sort_col\"]
set err [catch {
db eval $eval_str v {
if { $show_header } {