Dear all,

Thank you for all your valuable suggestion, it's good idea to put the whole 
script here, also good idea everytime to check the result, so I put the whole 
script here:
The $result always returnĀ false, it don't allow me to create a simple table, 
the 
table name surely not exist, I change tbl3, 4, 5, all not able to create. (that 
could be the same reason why insert is not working, if not even able to create 
table, let alone insert.)

<?php
$dbh = new PDO('sqlite:db1.db');
$result=$dbh->query("create table tbl2 (one varchar(10),two varchar(10));");
var_dump($result);
?>



----- Original Message ----
From: Stephan Beal <sgb...@googlemail.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Thu, 7 July, 2011 9:18:07 PM
Subject: Re: [sqlite] Insert not working for sqlite3

On Thu, Jul 7, 2011 at 2:17 PM, Simon Slavin <slav...@bigfraud.org> wrote:

> For each operation you should test the $result and check to see it's
> SQLITE_OK.
>

Or enable exceptions and you don't have to check for errors (because they
will cause an exception).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to