2 # Simple Test file to test all mysqltcl commands and parameters
3 # please create test database first
6 # >create database uni;
8 # >mysql -u root <test.sql
9 # please adapt the parameters for mysqlconnect some lines above
11 if {[file exists libload.tcl]} {
14 source [file join [file dirname [info script]] libload.tcl]
17 set handle [mysqlconnect -user root]
19 # use implicit database notation
20 puts "1 rows [mysqlsel $handle {select * from uni.Student}]"
21 puts "1 Table-col [mysqlcol $handle -current {name type length table non_null prim_key decimals numeric}]"
22 puts "1 [mysqlnext $handle]"
24 # Test sel and next functions
26 puts "rows [mysqlsel $handle {select * from Student} -list]"