Forum OpenACS CMS: Re: OpenACS database API

Collapse
7: Re: OpenACS database API (response to 1)
Posted by Siqsuruq Siqsuruq on
Hello, I've seen you discuss nsdbi, and I have a question not really related to API but nsdbi itself. I have a table in my DB when im trying to get 1row or 0or1row, its always rising an error "query returned more than 1 row", and to be honest no idea why? I know there is only one row in a table with such value here is my proc:
	proc select_id_by_name {table name} {
		set ser [ns_info server]
		if {[dbi_0or1row "SELECT uuid_${table} FROM $table WHERE name = :name"]} {
			set mysteryMan "$uuid_client"
		} else {
			set mysteryMan 0
		}
	}