freebsd-ports/databases/sqlite34/files/example.tcl
2004-08-31 19:06:39 +00:00

14 lines
224 B
Tcl

package require sqlite
if {$argc!=2} {
puts stderr "Usage: %s DATABASE SQL-STATEMENT"
exit 1
}
sqlite db [lindex $argv 0]
db eval [lindex $argv 1] x {
foreach v $x(*) {
puts "$v = $x($v)"
}
puts ""
}
db close