display sql result inline in dtml page?
Hi, I have a index page written in dtml. I want to display the results of a sql query 'inline'. The dtml-in tag appears to return the results of a query but puts them on a new line, the dtml-call tag, to the best of my knowledge, isn't designed to return the results of the query. I want a paragraph along the lines of: In this online grocery shop you will find 7 types of orange, 21 types of apples, 14 types of pear. Our team of 45 staff will package your order. Where an sql statement is used to count the number or oranges, apples or pears respectively. Do I really have to use a separate python script to do this? Any help appreciated, Rob
Hi Rob
In this online grocery shop you will find 7 types of orange, 21 types of apples, 14 types of pear. Our team of 45 staff will package your order.
<dtml-in myCountQuery> In this online grocery shop you will find <dtml-var count1> types of orange... </dtml-in> Assuming that myCountQuery is just doing 'SELECT count(field) AS count1' then you will only get on row back so you don't need to worry about the line being repeated. Good to see someone else using Zope in Edinburgh! Andrew -- Logical Progression Ltd, 20 Forth Street, Edinburgh EH1 3LH, UK Tel: +44 (0)131 550 3733 Web: http://www.logicalprogression.net/
participants (2)
-
Andrew Veitch -
RI Dunfey