Zope DTML ZSQL method using select with conditionals

<dtml-comment>
   title:Select record
   arguments:id
   connection_id:MySQL_database_connection
   max_rows:100
   max_cache:0
   cache_time:0
   class_name:
   class_file:
</dtml-comment>
SELECT
<dtml-if id>
all, fields, needed
<dtml-else>
id, name, created
</dtml-if>
FROM table
<dtml-if id>
WHERE id = <dtml-sqlvar id type="int">
</dtml-if>
Posted by
Snippet Viewed 1774 times.

Share your Zope DTML code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.

 

Submit | Browse

Most Recent zope dtml snippets

Most Viewed