[Zope] dynamically generating sql queries?
siva k
mannis2000 at hotmail.com
Thu Mar 29 06:59:15 EDT 2007
Hi,
Thank you very much for your answer.
As you suggested, i concatenate the string with an integer to create a
fieldname and then
pass it to zsql object along with language argument. I do everything inside
a Script (Python)
object that accepts 3 arguments (field,index,language)now.
-
result=field+str(index)
res=context.select_sql(field=result, language=language)
print res[0].result
return printed
-
I test this python script inside ZMI and run into problems.
It works only if I explicitly specify the columname like "print
res[0].author_1".
another question- how can one specify row index here?(res[row index]). Each
language has one row.
thanks
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Zope
mailing list