Version 9 of mysqltcl

Updated 2005-02-12 15:49:49

What: mysqltcl

 Where: http://freshmeat.net/projects/mysqltcl/
 Homepage: http://www.xdobry.de/mysqltcl/index.html
 Description: Tcl interface to mysql relational database.
        Supports Tcl 8 objects, unicode, nested queries, etc.
        Currently at version 3.01 .
 Updated: 1/06/2005
 Contact: See web site

See also MySQL.


SS: 12Feb2005, I wrote this very short example of mysqltcl usage for a guy asking on the tclers chat how to use it. I'll put it here to redirect to this page the next people asking about it.

The code connect to the mysql server at 'localhost', with username 'root', password 'foobar', select the database 'mysql', and try the query "SELECT HOST FROM USER". Every user returned is printed using puts, finally the mysql handle is closed.

 package require mysqltcl
 set m [mysqlconnect -user root -db mysql -password foobar]
 mysqluse $m mysql
 foreach res [mysqlsel $m {select host from user} -flatlist] {
     puts $res
 }
 mysqlclose $m

[ Category Package | Category Database ]