>
> From: "Anirban Sarkar" <[EMAIL PROTECTED]>
> Date: 2005/02/17 Thu AM 10:51:08 GMT
> To: <[email protected]>
> Subject: [sqlite] Unrecognised token error in insert statement
> The variable $system_tm contains the value 16:40
> When I try to insert this value in a varchar field in a sqlite table it gives
> me ' unrecognised token ":" ' due to which the insertion process fails.
>
> How do I get rid of this?
ensure that $system_tm is surrounded with ' ' in the sql. If that isn't the
problem, use 'puts' to output the actual sql statement you have built and are
passing to 'db eval', and post here.
> Probably should be some addslashes or some other stuff, but I am not quite
> sure.
The only thing that I think needs escaping are , (commas), which need escaping
with a second comma.
You can deal with these with a string map, e.g.
set my_var [string map {, ,,} $my_var]
Lawrence
> Kindly help.
>
> Regards,
> Anirban Sarkar
>
>
-----------------------------------------
Email sent from www.ntlworld.com
virus-checked by McAfee
visit www.ntlworld.com/security for more information