[ic] what is wrong with my query?
Mike Heins
interchange-users@icdevgroup.org
Mon Jul 22 17:21:02 2002
Quoting Dennis Chen (dchen@technicacorp.com):
> I'm trying to do an [if] comparision inside a query but I guess my [if] tags
> are wrong.
> There's not much docs about [if-sql] tags and the ones that I found on the
> interchange lists didn't work either. Here's my code below.
>
> <select name="issue_agency" >
> [query sql="SELECT * FROM agency" type=list]
> <option value="[sql-param code]"
> [if term="sql-param issue_agency" op="eq" compare="/[value
> issue_agency]/" ] selected [/if]> [sql-param issue_agency]
> </option>
> [/query]
> </select>
>
>
> also found a snippit of code which I changed and didn't work either...
> [set agency_code][value issue_agency][/set]
> [if type=explicit compare="($Scratch->{agency_code} =~ "/[value
> issue_agency/"] selected
> [else] problems! [value issue_agency] [/else]
> [/if]
>
> I just wanted to print SELECTED on the drop down list when the
> [value issue_agency] == [sql-param issue_agency].
>
This was answered at least five times.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
Software axiom: Lack of speed kills.