[Zope] ZSQL, Python Script, number of records

Milos Prudek prudek@nembv.cz
Tue, 7 Aug 2001 09:22:14 +0200


>  > To check whether a record exists I'm using this:
>  >
>  > exist (ZSQL method):
>  > SELECT count(*) as I FROM ... WHERE ... ;
>  >
>  > Python Script:
>  > for x in exist(m_id=m_id):
>  >   if x.i==0:
>  >      print "no data"
>  >   else:
>  >      print "there are some data"
>
>    x=exist(m_id=m_id)[0]

What does that [0] mean? The first row of results from the "exist" ZSQL 
method?

-- 
Milos Prudek