You could use a single ZSQL method that accepts either a table name, or part of a select statement if you need to do more tuning than just change the table name in the query. You always call the same method but tell it what you want each time. I'd suggest creating the html with dtml rather than a python script. After all, that's really what it's for. Let python pass a list to the dtml in the page, let the page format itself. Tom P [Kevin L]
I want to pass the name of a Z SQL Method into a python script, then execute that method and iterate over the results. Is this possible?
My app uses a lot of dropdowns populated from database tables. Rather than rewriting the code for each one, I'd like to create one python script that takes a z sql method as a parameter, then executes it and spits out the html for the dropdown. Every Z SQL Method would return the same column names (id & value). Has this been done before?