Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread James_21th
; $result=$dbh->query('select * from tbl2'); foreach($result as $row) { print "row=".$row['one'].",".$row['two']."\n"; } $dbh=NULL; print "Done\n"; } catch(PDOException $e) {   print "Exception: ".$e->getMessage()

Re: [sqlite] Insert not working for sqlite3

2011-07-10 Thread James_21th
uot;Oops!\n";   print 'Exception : '.$e->getMessage()."\n"; } ?> So now every time I run it we get this: D:\php>php   string(52) "create table tbl2 (one varchar(10),two varchar(10));" } Michael D. Black Senior Scientist NG Information Systems Adva

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread James_21th
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 chang

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread James_21th
? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of James_21th Sent: Thursday, July 07, 2011 3:32 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Insert not working for sqlite3 Yes, 100% sure, because I only have one

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread James_21th
x27;,'new2')"); } catch(PDOExecption $e) { print "Error!: " . $e->getMessage() . ""; } - Original Message From: Stephan Beal To: General Discussion of SQLite Database Sent: Thu, 7 July, 2011 2:27:34 PM Subject: Re: [sqlite] Insert not working for sqlite3 On

Re: [sqlite] Insert not working for sqlite3

2011-07-06 Thread James_21th
or sqlite3 I don't see something like a "create table tbl1(one, two);" statement. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of James_21th Sent: Thursday, July 07, 2011 1:52 AM To: General Discussion of SQLite

[sqlite] Insert not working for sqlite3

2011-07-06 Thread James_21th
Dear all,   I'm able to connect to sqlite3 DB and display the data inside, but when insert data, no matter how to try, just don't work, there's no error, but no data inserted.   Below is the simple PDO SQL I'm using, table name is "tbl1", the two fields name is just "one" & "two":   $dbh = new

[sqlite] Help needed for SQLite PHP

2011-07-03 Thread James_21th
Dear experts, I was quite excited when I see such a nice portable database---SQLite,  which can be installed locally. However, when I tried to open the SQLite DB with PHP, just a simple open script will cause "HTTP 500 Internl server error", my web server is running fine with normal php code.