14 Mar
2000
14 Mar
'00
5:45 p.m.
<dtml-in sql_exist> <dtml-if "exist > 0"> <dtml-in sql_newID> insert into table (ID, name) values (<dtml-var newID>, <dtml-sqlvar name...> </dtml-in> </dtml-if> </dtml-in> This looks like it'll work, but there has *got* to be a simpler and more efficient way of doing it... ;-)
This worked because I knew the sql_newID and sql_exist will only return a single value, so the loop only iterates once. I've never seen the <dtml-var sqldelimiter>, though, so I don't know what it does....
It's from the ZSQL guide, it lets you put more than one SQL statement in a ZSQL method. What I don't understand is why the 'exist' variable stops existing... (maybe I should have called it something else... ;-) Chris