if { [catch [db_1row select_none "select user_id from users where user_id=-100"]] } { #Do something } else { #Do something else }
Works.