I have been using <dtml-in sqlMethod size=4 query=start_query> and I find that 80% of the time it will return 4 results but sometimes, for no apparent reason it will return 5 or 6. This is happening with a few of my ZSQL Methods? Bug or am I going crazy? JMA
On Tue, Mar 21, 2000 at 09:21:38AM -0500, J. Atwood wrote:
I have been using <dtml-in sqlMethod size=4 query=start_query> and I find that 80% of the time it will return 4 results but sometimes, for no apparent reason it will return 5 or 6. This is happening with a few of my ZSQL Methods?
Bug or am I going crazy?
Neither. Add orphan=0 to the tag, and you'll feel sane again. if ommitted, orphan is set to 3. This means that if the last batch is smaller than 3 items, that batch is added to the one but last batch. See it as a 'minimal batch size' parameter. For more info, see: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.8.5.1.html -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
At 9:21 am -0500 21/3/00, J. Atwood wrote:
I have been using <dtml-in sqlMethod size=4 query=start_query> and I find that 80% of the time it will return 4 results but sometimes, for no apparent reason it will return 5 or 6. This is happening with a few of my ZSQL Methods?
Are these batches of records the 'last' batch in the ZSQL query? If so, it's the 'orphan' parameter kicking in, which *I believe* is set to 3. If you have 19 records returned with a batch of 4, you get 1-4, 5-8,9-12,13-16,17-19 - no problem there If you have 9 records returned with a batch of 4, you *would get* 1-4, 5-8, 9 (on it's own). The 'orphan' parameter would make the last batch return 5-9 (ie 5 records). It's described in greater detail in the ZSQL users guide... hth tone ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
"J. Atwood" wrote:
I have been using <dtml-in sqlMethod size=4 query=start_query> and I find that 80% of the time it will return 4 results but sometimes, for no apparent reason it will return 5 or 6. This is happening with a few of my ZSQL Methods?
Bug or am I going crazy?
Neither. The in tag by default does not like orphans (result batches smaller than 'size'). Set 'orphan=0' and sleep in peace that your sanity is intact (and that the in tag is bug free). -Michel
participants (4)
-
J. Atwood -
Martijn Pieters -
Michel Pelletier -
Tony McDonald