RE: [Zope] Searching for a generalized key in ZSQL...
I've tried out the <!--#if searchkey in ['firstname','lastname',etc...] and it complains about the word "in", saying it isn't a legal argument. I've also tried: <!--#in ['firstname','lastname',etc...]--> <!--#if "searchkey == sequence-item"--> select * from Users where <!--#var searchkey--> = <!--#sqlvar searchvalue type=string--> order by <!--#var searchkey--> <!--#/if--> <!--#/in--> And that complains: Error, exceptions.KeyError: ['firstname','lastname',etc...] SQL used: Could not render the query template! The list looks good, from my view, so I don't understand the key error. Donner
Donald Holten wrote:
I've tried out the <!--#if searchkey in ['firstname','lastname',etc...] and it complains about the word "in", saying it isn't a legal argument. I've also tried: <!--#in ['firstname','lastname',etc...]-->
Should be : <!--#in "['firstname','lastname',etc...]"--> -------------- Hannu
In article <199908021750.LAA08558@sailor.lanl.gov>, Donald Holten <donner@biophysics.lanl.gov> writes
<!--#if "searchkey == sequence-item"-->
That syntax is also wrong <!--#if "searchkey == _['sequence-item']"--> ------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
participants (3)
-
Donald Holten -
Graham Chiu -
Hannu Krosing