forum::get (public)

 forum::get -forum_id forum_id -array array

Defined in packages/forums/tcl/forums-procs.tcl

get the fields for a forum

Switches:
-forum_id (required)
-array (required)
Returns:

Testcases:
forum_count_test, web_forum_view, web_forum_edit, web_forums_message_and_reply
Source code:
    # Select the info into the upvar'ed Tcl Array
    upvar $array row

    set global_varname ::forum_${forum_id}

    if {[info exists $global_varname]} {
        array set row [array get $global_varname]
    } else {
        if {![db_0or1row select_forum {} -column_array row]} {
            error "Forum $forum_id not found" {} NOT_FOUND
        }
        array set $global_varname [array get row]
    }
Generic XQL file:
<fullquery name="forum::get.select_forum">
    <querytext>
            select forums_forums.*
            from forums_forums
            where forums_forums.forum_id = :forum_id
        </querytext>
</fullquery>
packages/forums/tcl/forums-procs.xql

PostgreSQL XQL file:
packages/forums/tcl/forums-procs-postgresql.xql

Oracle XQL file:
packages/forums/tcl/forums-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: