Re: [sqlite] accessing php produced db from shell

2009-03-18 Thread prad
On Wed, 18 Mar 2009 10:04:59 + (GMT) Swithun Crowe wrote: > Or, maybe $db should be $base, as in your example above? > yes that was one of my silly oversights :D there were several others, but they essentially boiled down to trying to follow the tutorial and

Re: [sqlite] accessing php produced db from shell

2009-03-18 Thread Swithun Crowe
Hello p i couldn't do php -i (bash: php: command not found), may be i have to p install the cli php? Yes, the cli php is optional. p $base = new PDO("sqlite:$dbname", 0666, $err) I don't think you need the other arguments for PDO. Something like: if ($base = new PDO("sqlite:$dbname)) { if

Re: [sqlite] accessing php produced db from shell

2009-03-18 Thread prad
On Wed, 18 Mar 2009 08:17:56 + (GMT) Swithun Crowe wrote: > php -i | grep -i sqlite will tell you the versions that are being > used on your machine. > ok thanks! i couldn't do php -i (bash: php: command not found), may be i have to install the cli php?

Re: [sqlite] accessing php produced db from shell

2009-03-18 Thread Swithun Crowe
Hello p i'm using sqlite3, but with php5 i had to install php5-sqlite. is the p sqlite i'm using with php5 on debian version 2? could this be the p problem? or is it something else? PHP uses SQLite2 in its normal extension. But the PDO extension uses SQLite3, so you can use that extension

[sqlite] accessing php produced db from shell

2009-03-18 Thread prad
i'm working through one of the php-sqlite tutorials: http://www.scriptol.com/sql/sqlite-table.php it works fine, but when i try going in with sqlite3 from the shell and try to do anything, i get SQL error: file is encrypted or is not a database i'm using sqlite3, but with php5 i had to install