|
db_string Returns the first column from an SQL query
package require nstcl-database ?1.0?
package require nstcl ?1.0?
::nstcl::db_string statement_name SQL ?-default default_value ?
Returns the first column of the result of an SQL query. An error is thrown if the database returns more than one row. Also, if no rows are returned an error will be thrown unless the optional -default switch is provided, in which case the default_value will be returned instead.
The documentation for the database_api for information on statement_name and which database pool is used to evaluate SQL when multiple pools are defined.
database, nstcl