diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-20 23:10:03 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-20 23:10:03 -0500 |
commit | 9c4d839673d7c4e20164452f036dc292b561a3bf (patch) | |
tree | 5cef702e07afbb0aee888ecf55ee7c39fa0887e1 | |
parent | b49a6dea80325b920e078c3ad91522b19d48fb2c (diff) | |
download | GradeBook-9c4d839673d7c4e20164452f036dc292b561a3bf.tar.gz GradeBook-9c4d839673d7c4e20164452f036dc292b561a3bf.zip |
AddedUserNonWeb proc is added
Ignore-this: a40f889adad2dcb51f1f574321285303
darcs-hash:20110121041003-067c0-35e510e87a0fc82f53bc36c4fc9d026b41119983.gz
-rwxr-xr-x | GradeBook.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index a0a067f..aa6b112 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -59,6 +59,15 @@ proc CreatePasswordsTable {db} { db eval $eval_str } +proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {guest}} } { + set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PassWordHash, GroupName) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name')] + set err [catch {db eval $eval_str } errStat] + if { $err } { + htmlErrorMsg $errStat + dbg "the following error happen: $errStat" 3 + } +} + proc CreateGradesTable {db} { db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, HW01 real)} |