I am currently experiencing a problem with an INSERT statement in SQLite.

First of all an excerpt from the code:

$val = "";
$query = "INSERT INTO node (uri,name) VALUES (".$val.",'bla')";

$db_name = "mysqlite";

if($db_hdl = sqlite_open($db_name)){
        $db_result = sqlite_query($db_hdl,$query);

I get the error message:

Warning: sqlite_query(): near ".": syntax error in C:\Programme\xampp\htdocs\dipl\testclient\sqlite_test.php on line 10

I tried addslashes (which I know I shouldn't), sqlite_escape_string, any variant of quotes etc, I asked google and the searched the news groups but with no relevant result, except the insight, that others experience the same so long unsolved problem or use a syntax in their tutorials that does not work with my code...

As you an see from the error message, I use Windows, Apache, PHP4 with SQLite in a 2.8.14 version.

If anyone has a clue, please contact me or just answer.
Thanks in advance

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

Reply via email to