Don't know if this is the right way to do it, but this is what I do: <dtml-in "sqlView.expressCampaigns()"> <dtml-let newctn="CTN +1"> <dtml-call "REQUEST.set('ctn', newctn)"> </dtml-let> </dtml-in> ----- Original Message ----- From: James Punteney <jamesp@mmgco.com> To: <zope@zope.org> Sent: Wednesday, November 17, 1999 1:59 PM Subject: [Zope] Incrementing an Integer
Hello,
I'm having a problem trying to increment an integer here is the code: <dtml-in "sqlView.expressCampaigns()"> <dtml-call "REQUEST.set('ctn', CTN + 1)"> </dtml-in>
I have a SQL Query that returns a column called "CTN" in the database (MySQL) this is defined as an integer, and currently has the value of "20000" (the table only contains one entry right now). I want to set the variable "ctn" to the CTN returned from the query plus 1.
This is the error I get: Error Type: TypeError Error Value: illegal argument type for built-in operation
When I view the source of the page I just see CTN: 20000, which I had printing out at one point but have since removed, but no error information or anything.
Any thoughts would be appreciated.
Thanks, --James
_______________________________________________ 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 )