2 Feb
2000
2 Feb
'00
4:57 p.m.
Hi all I've got a problem with a ZSQL method which looks like; select max(<dtml-var key_field>) as keyval from <dtml-var table_name> This works perfectly as long as there is at least one record in the table, but seems to just hang if the table is empty. I'm trying to use this method from an external method as follows; res = self.qryMaxKey(table_name='events', key_field='eventid') # Test for empty return here return res[0][0] so I've tried tests like; if not res: return 0 if res == []: return 0 if res == None: return 0 but none of these seem to work. All ideas gratefully receved! TIA David
9560
Age (days ago)
9560
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Salgado