8 Jan
2002
8 Jan
'02
10:03 p.m.
Beaudette, Sheree writes:
I have a form that sets the variable copyitem, a number from 1 to ... (an integer)
<input type="text" name="copyitem">
Once I submit the form
I want copyitem to be compared with a sequence-number from a SQL query, code as follows
<dtml-in clsqGetNotes> <dtml-let seqnum=sequence-number> <dtml-if "seqnum == copyitem"> Unless you do something special, all request variables are strings. "sequence-number" on the other hand are integers. And the integer 1 is not equal to the string '1'. You need to coerce either the integer or the string. Try:
<dtml-if "seqnum == _.int(copyitem)"> or <dtml-if "`seqnun` == copyitem"> Dieter