Re: Re: SQLite problem INSERTing string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I figured it out.
SQLLite doesnt take single quotes as the text or varchar datatype
values.... the strings passed to sqllite should match the data type of
the column ... so ur mistake was creating a "data type mismatch at the
SQL lite end.

hmm... thanx for the info Stefan... I never knew SQLLite doesnt
support the inline Inserts using Set... thanx for that. I dont use
SQLLite now.. plannin' to do that whenever possible..


On Sun, 19 Sep 2004 19:58:14 +0200, Stefan Reimers
<php@xxxxxxxxxxxxxxxxx> wrote:
> Hi again,
> 
> first of all thanks for quick suggestions.
> After some more testing, I can get more specific:
> 
> This might be a more general problem than the "." in the error message.
> Even when I use $val = "hello" I get an equivalent error message
> 
> sqlite_query(): near "hello"
> 
> As said, I have done all the quoting stuff, so \' instead of ' was no
> solution either, until I tried double quotes instead of single ones,
> just as M Saleh Eg suggested. So the following statement finally works:
> 
> $query = "INSERT INTO node (uri,name) VALUES (\"$val\",\"\")";
> 
> Just for everybody else:
> 
> SQLite does not support the SET statement in INSERTs, so
> 
> INSERT INTO table SET attr=val
> 
> would not work.
> 
> Thx
> 
> 
> Stefan
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux