[Zope] Finding out how many rows is selected in database
paul_s_johnson@urscorp.com
paul_s_johnson@urscorp.com
Thu, 5 Apr 2001 13:14:41 -0500
If a ZSQL method returns no rows its value is None, right?
why not:
<dtml-if zsql_queryname>
Hey, something was returned by ZSQL method!
<dtml-else>
Hey, nothing was returned by ZSQL method.
</dtml-if>
>On 05 Apr 2001 09:57:14 -0500, Steve Drees wrote:
>> > I need to do one thing if any rows is returned and another if there is
>> > no records in the database
>>
>>
http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/BEBF9A98F9A59B3F
>
>Thanx but it only helped a bit ...
>See he has the same problem as me - if need to do one thing if there are
>records returned and another if no records are returned.
>Actually I need to add a new item to my database with one number higher
>than the item with the highest number, e.g. if there are an item in the
>database with number 2 then the new one must have number 3.
>And if there are no items then the new one must have number 1.
>
>ANy good ideas ?
>The ones I got earlyer doesn't work
>
>Gitt
Use of an AUTO_INCREMENT field makes maintaining this easier. It will
automatically create a value 1 greater than the existing maximum.
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )