[Zope-DB] Re: ZSql Method problem (again)
kraus at hagen-partner.de
Thu Sep 9 03:30:32 EDT 2004
ibrahim at euronia.it wrote:
> Hi All,
> I will try to clarify the question.
> I don't need to show these data but to import them to
> zope. I have a ZsqlMethod called "SelezionaProdotti". I made
> a little python script for the test that is the following
> elencoProdotti = container.SelezionaProdotti()
> conto = 0
> for prodotto in elencoProdotti:
> conto = conto +1
> print "totale = %d" % conto
> return printed
Use the src__-parameter to see the SQL-statement:
elencoProdotti = container.SelezionaProdotti()
print "totale = %d" % len(elencoProdotti)
(Hmm, this is useless in this case because you don't have any parameters
passed to the statement. But it is good to know for future situations
like this ;-))
And then run the statement in an mysql-client and see what/how many
results you get.
> what I get is "totale = 100".
> I noticed tha if I go to the test page of the Zsqlmethod and I test the
> sql (that will show 20 items a time) I can go on till 100 and I will not
> see the "next 20 items" any more.
So it seems that the result is either correct and will give you only 100
results or the "Maximum rows to retrieve" value in the advanced tab is
set to 100.
> Thanks again
> Ibrahim Khachab
More information about the Zope-DB