[Zope] sql returning number
Derek S. Wilson
dwilson at vhswest.com
Thu Sep 25 16:53:31 EDT 2003
That is a much more elegant solution. Thank you. It works!
Thanks,
Derek Wilson
-----Original Message-----
From: Kamal Gill [mailto:ksgill at ucdavis.edu]
Sent: Thursday, September 25, 2003 1:33 PM
To: Derek S. Wilson
Cc: zope at zope.org
Subject: Re: [Zope] sql returning number
Have you tried..
select MAX(ID)+1 as ID from AllProjects
?
- kg
On Thursday, September 25, 2003, at 01:14 PM, Derek S. Wilson wrote:
I have a slight problem... I'm working on a project management
zope site, and I need to create a new sequential project ID for each
project. I made a zsql statement as follows...
select MAX(ID)+1 from AllProjects
This gives the expected:
<image.tiff>
I now want to take that value(3) and use it as my ID. The column
name is ID, So, here's how I go about doing it.
<dtml-in getNewProjectID>
Here's the ID: <dtml-var ID>
</dtml-in>
but it keeps giving me a'KeyError" - "ID"
of course, lowercase id just shows the name of the folder that
the dtml document is in.
So, does anyone know how I can put that result into my webpage?
Thanks,
Derek S. Wilson
*****HIPAA Confidentiality Notice*****
The documents inside this electronic transmission contain
confidential information belonging to the sender that is legally
privileged. This information is intended only for the use of the
individual or entity named above. The authorized recipient of this
information is prohibited from disclosing this information to any other
party and is required to destroy the information after its stated need
has been fulfilled, unless otherwise required by law. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or action taken in reliance on the contents of
these documents is strictly prohibited. If you received this electronic
transmission in error, please notify the sender immediately to arrange
for return.
<Derek S.
Wilson.vcf>_______________________________________________
Zope maillist - Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20030925/e4f6e43f/attachment-0001.html
More information about the Zope
mailing list