nstcl  >  Documentation  >  nstcl-database  >  database_to_tcl_string_or_null

Tcl Powered!

database_to_tcl_string_or_null

NAME

database_to_tcl_string_or_null — Returns one (possibly non-existant) value from an SQL query

SYNOPSIS

package require nstcl-database ?1.0?
package require nstcl ?1.0?

::nstcl::database_to_tcl_string_or_null dbhandle SQL ?default?

DESCRIPTION

Returns the first column of the result of an SQL query. An error is thrown if the database returns more than one row. If no rows are returned, and default is specified then the value of default is returned (otherwise the empty string is returned).

KEYWORDS

database, nstcl