Can not insert data into SQLite3 database through browser however i
can easily insert data into my db from konsole, in both attmpts i used
php 5.2.6 on 2.6.25.* linux kernel
i think there is a problem with my php setup but i could not find
it...
here is the code;
----------------------------------------------------------------------------------------
$db = new PDO("sqlite:bar .db");
$sql = "select * from user";
$query = "insert into user values(null,'fo o','bar')";
$db->query($query );
print_r($db->query($query)) ;
print_r($db->query($sql)) ;
foreach ($db->query($sql) as $row)
print $row['id'] . " " . $row['text'] . " " . $row['text2'] .
"<br>";
unset($db);
------------------------------------------------------------------------------------------
first print_r() function prints nothing, actually "select" works,
"insert" wouldn't....
What's the problem?
can easily insert data into my db from konsole, in both attmpts i used
php 5.2.6 on 2.6.25.* linux kernel
i think there is a problem with my php setup but i could not find
it...
here is the code;
----------------------------------------------------------------------------------------
$db = new PDO("sqlite:bar .db");
$sql = "select * from user";
$query = "insert into user values(null,'fo o','bar')";
$db->query($query );
print_r($db->query($query)) ;
print_r($db->query($sql)) ;
foreach ($db->query($sql) as $row)
print $row['id'] . " " . $row['text'] . " " . $row['text2'] .
"<br>";
unset($db);
------------------------------------------------------------------------------------------
first print_r() function prints nothing, actually "select" works,
"insert" wouldn't....
What's the problem?
Comment