Groups | Search | Server Info | Login | Register
Groups > comp.lang.tcl > #55689
| From | meshparts <alexandru.dadalau@meshparts.de> |
|---|---|
| Newsgroups | comp.lang.tcl |
| Subject | Re: Optimal used of sqlite |
| Date | 2026-04-30 11:43 +0200 |
| Message-ID | <10sv887$15mm9$1@tota-refugium.de> (permalink) |
| References | (2 earlier) <10ste7r$15qud$1@tota-refugium.de> <10stg30$15s8e$1@tota-refugium.de> <10stt8j$14s5d$1@tota-refugium.de> <10stufp$14srb$1@tota-refugium.de> <1777540923-4652@newsgrouper.org> |
Am 30.04.2026 um 11:22 schrieb rene:
> There is no need to use "" and escape your variables.
> This should work, is faster and save (no code injection).
> The eval method will parse your string correctly. Note the {}.
>
> db eval {INSERT INTO results VALUES($step-global,$Im)}
>
> HTH
> rene
Well, it doesn't.
You can use my demo below to test your proposal.
I get the error "no such column: global" when not using the single
quotes for the key argument.
file delete test.db
set step 1
set Im "1 2 3"
sqlite3 db "test.db"
db eval {CREATE TABLE results(key TEXT, data TEXT)}
db eval {INSERT INTO results VALUES('$step-global',$Im)}
puts [db eval "SELECT data FROM results WHERE key='$step-global'"]
db close
Back to comp.lang.tcl | Previous | Next — Previous in thread | Next in thread | Find similar
Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 17:32 +0200
Re: Optimal used of sqlite Rich <rich@example.invalid> - 2026-04-29 15:50 +0000
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 19:13 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 19:44 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 19:58 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 20:06 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 23:29 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 23:50 +0200
Re: Optimal used of sqlite rene <user4652@newsgrouper.org.invalid> - 2026-04-30 09:22 +0000
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 11:43 +0200
Re: Optimal used of sqlite rene <user4652@newsgrouper.org.invalid> - 2026-04-30 13:09 +0000
Re: Optimal used of sqlite Ralf Fassel <ralfixx@gmx.de> - 2026-04-30 15:35 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 15:49 +0200
Re: Optimal used of sqlite Rich <rich@example.invalid> - 2026-04-29 21:56 +0000
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 00:12 +0200
Re: Optimal used of sqlite Rich <rich@example.invalid> - 2026-04-29 22:22 +0000
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 08:00 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 08:34 +0200
Re: Optimal used of sqlite Ralf Fassel <ralfixx@gmx.de> - 2026-04-30 14:38 +0200
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-29 19:15 +0200
Re: Optimal used of sqlite Rich <rich@example.invalid> - 2026-04-29 21:54 +0000
Re: Optimal used of sqlite meshparts <alexandru.dadalau@meshparts.de> - 2026-04-30 00:08 +0200
Re: Optimal used of sqlite Julian Bradfield <jcb@inf.ed.ac.uk> - 2026-04-30 10:25 +0000
csiph-web