Forum OpenACS Q&A: Response to Subject Administration

Collapse
Posted by hau wan lin on
I have tested the sql statement in pgsql promplt. it works, but it return with 0 row because no record from that sql statement. I guess something go wrong with OpenACS when a query doesn't return a row. Error: Database operation "1row" failed (exception NSINT, "Query did not return a row.") Database operation "1row" failed (exception NSINT, "Query did not return a row.") while executing "ns_db 1row $db [db_sql_prep $sql]" invoked from within "set selection [ns_db 1row $db [db_sql_prep $sql]]..." invoked from within "if { $no_prep == 1 } { set selection [ns_db 1row $db $sql] } else { set selection [ns_db 1row $db [db_sql_prep $sql]] }" (procedure "database_to_tcl_string" line 3) invoked from within "database_to_tcl_string $db "select count(dept.department_id) from user_group_map map, ..." invoked from within "set n_other_departments [database_to_tcl_string $db "select count(dept.department_id) Can I know the rigth answer? Thank you for helping me.