Forum OpenACS Q&A: Re: setting default values in ad_page_contract

Collapse
Posted by Dave Bauer on
elements with a default value need to be surrounded by

{ }

as in the example

{ name[:flag,flag,flag] default }

That is, it is formatted as a two element tcl list where the first element is name:flag and the second element is default.

Collapse
Posted by Matthew Smith on
Here's what I have, I beleive I am already doing as you suggested:

ad_page_contract {
uses bind variables in a query
@author Matthew Smith
} {
user_id:integer "1"
} -properties {
users:onerow
}

set query " select
first_name, last_name
from
ad_template_sample_users
where user_id = :user_id"

db_1row users_query $query -column_array users