merge_form_with_query (public, deprecated)

 merge_form_with_query [ -bind bind ] form statement_name sql_qry

Defined in packages/acs-tcl/tcl/deprecated-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Merges a form with a query string. DEPRECATED: this proc does not comply with OpenACS naming convention. Furthermore, ns_formvalueput supports a limited number of HTML variants and input tag types and is subject to various other limitations. For a modern implementation addressing the use-case of this proc one should probably use tools such as tDOM.

Switches:
-bind (optional)
A ns_set stuffed with bind variables for the sql_qry.
Parameters:
form (required)
the form to be stuffed.
statement_name (required)
An identifier for the sql_qry to be executed.
sql_qry (required)
The sql that must be executed.
See Also:

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc merge_form_with_query
    set set_id [ns_set create]

    ns_log debug "merge_form_with_query: statement_name = $statement_name"
    ns_log debug "merge_form_with_query: sql_qry = $sql_qry"
    ns_log debug "merge_form_with_query: set_id = $set_id"

    db_0or1row $statement_name $sql_qry -bind $bind -column_set set_id

    if { $set_id ne "" } {

        for {set i 0} {$i < [ns_set size $set_id]} {incr i} {
            set form [ns_formvalueput $form [ns_set key $set_id $i] [ns_set value $set_id $i]]
        }

    }
    return $form
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/deprecated-procs.xql

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