On 1/23/18, Rolf Ade <[email protected]> wrote:
>
> While being able to use Tcl variable references inside db eval SQL
> statements (as in
>
> set name "foo'bar"
> db eval {SELECT * FROM sometable WHERE somecolumn = $name}
>
> ) this does work only for "simple" Tcl variable references.
That is correct.
You can use an array variable, but the index part must be a constant.
For example:
set x(name) "whatever"
db eval {SELECT * FROM tab WHERE col = $x(name)}
As you observce, you cannot use another variable as the index to the array.
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users