I don't know how PHP's db connector works but... On 3/9/08, Aharon (Rony) Shapira <[EMAIL PROTECTED]> wrote: > > I created a simple table named "books" in "library.db". > After entering "select * from books" I saw the data that I put into it. > > When trying to access it through php: > $file = "library.db"; > // open database file > > $handle = sqlite_open($db) or die("Could not open database");
Is that a typo? You are setting $file, but trying to open $db. > > I got the following: > > "Could not open database" > > > > When I tried the following: > > $file = "library.db"; > > // create database object > > $db = new SQLiteDatabase($file) or die("Could not open database"); > > I got the following: > > Fatal error: Uncaught exception 'SQLiteException' with message > 'SQLiteDatabase::__construct() [<a > href='function.SQLiteDatabase---construct'>function.SQLiteDatabase---construct</a>]: > file is encrypted or is not a database' in > /home/zbfckla/public_html/Ocx.php:17 Stack trace: #0 > /home/zbfckla/public_html/Ocx.php(17): > SQLiteDatabase->__construct('library.db') #1 {main} thrown in > /home/zbfckla/public_html/Ocx.php on line 17 > > > > Once again I apologies for these silly questions. > > Aharon > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users