oevelse.9 opg.D: Kan ikke fr variabel med over i en ny tilstand?

greenspun.com : LUSENET : WebdesignII : One Thread

I min restaurent.tcl skriver jeg:

$rest_name

i show.tcl (som vider alle ratings for en restaurant) skriver jeg:

set db [ns_db gethandle]

set query "select name, email, count(rest_name) as antal_vurderinger, rating, kommentar, rest_name, rest_id from rating where rest_id='$rest_id'"

set selection [ns_db select $db $query]

set oversigt "" while { [ns_db $db $query $selection] } { set_variables_after _query

Jeg ved godt, at det sikkert ikke er en helt korrekt selection jeg foretager, men selv med helt simple selections siger fejlmeddelelsen, at variablen rest_id ikke findes.

can't read "rest_id": no such variable while executing "set query "select name, rating, kommentar, email from rating where rest_id=$rest_id" " (file "/web/mlysholt/www/oevelse9/show.tcl" line 19) invoked from within "source $file"

HVad gr galt? mvh Merete

-- Merete Lysholt (mlysholt@it-c.dk), April 17, 2002

Answers

Response to oevelse.9 opg.D: Kan ikke får variabel med over i en ny tilstand?

Du mangler evt. "set_form_variables"

-- frank (frank@bjergoe.dk), April 17, 2002.

Moderation questions? read the FAQ