[Zope] what if the query gives no records?

2007-04-10 Thread siva k
Hi, A very basic question: a dtml-in loop calls an zsql method it works fine when there is data but when there is no data it should display no records found. But it displays nothing when there are no records. Please suggest a soultion dtml-in select_something(parameter=parameter

RE: Re: [Zope] dynamically generating sql queries?

2007-03-29 Thread siva k
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. -

[Zope] dynamically generating sql queries?

2007-03-28 Thread siva k
Hi, I have five fields in the database author1,author2..author5. Trying to generate a parameter for the select_sql method called result, I run into an error -cannot add type int to string. Could you please say how to concatenate a string and a number? please look at the code.. -- dtml-in

[Zope] Renaming all the zsql method's title in a given folder

2006-12-28 Thread siva k
body = method.src method.manage_edit(title, conn_id, args, body) Could you please spot the mistakes here? Thanks From: Andreas Jung [EMAIL PROTECTED] Reply-To: Andreas Jung [EMAIL PROTECTED] To: siva k [EMAIL PROTECTED], zope@zope.org Subject: Re: [Zope] setting a title to all objects

[Zope] setting a title to all objects in a folder?

2006-12-27 Thread siva k
Hello, Absolute newbie to python here. I try to set the SAME title to ALL the files in a zope folder using a python script. The code below is not working... no idea why def setfiletitle(folder,title): myfolder = getFolder(folder) for file in myfolder: setTitle(title)