Forum OpenACS Development: Response to How to use a Tcl list of ints in a int bind var?

Collapse
Posted by russ m on
<p>Ah, I see... But the point is to get the TCL-generated snippet
of SQL out of the query. If you're wanting to avoid
<blockquote>
set sql_list_of_ids [join $list_of_ids ", "]<br>
...<br>
and foo.id in ($sql_list_of_ids)
</blockquote>
then your code snippet above and
<blockquote>
and foo.id in ($list_of_bind_ids)
</blockquote>
isn't really any better... "using bind variables" isn't the point so
much as "avoiding ad-hoc generated SQL"...