You should be able to use python's slice like so: <dtml-if "word[:4] == 'help'" > ... where "word" is the variable you want to use only 4 characters of. Hope this helps, bye. ----- Original Message ----- From: joel grimes <joelgrimes@hotmail.com> To: <zope@zope.org> Sent: Thursday, June 15, 2000 3:18 PM Subject: [Zope] left(string, n) equivalent (newbie q.)
Pardon my ignorance, I'm coming from a VB/Access background.
I need to find an equivalent to using left(string, 4) in a zope SQL method's select query. My SQL book says I can use SUBSTRING(string, 1, 4) in a query but no luck. I'm connecting to an Access database.
btw - this mail list ROCKS! I've never waited more than 10 minutes for a response.
Thanks ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
_______________________________________________ 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 )