Welcome Guest, Not a member yet? Register   Sign In
Problem connecting to sqlite database
#1

[eluser]grumble[/eluser]
Hi good CI people,

I hate for my first post to be a cry for help, rather than something more positive, but needs must... I've just started using CI and am trying to connect to my SQLite database. Here is my setup.

database.php:
Code:
...
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "<path to sqlite db>/test.db";
$db['default']['dbdriver'] = "sqlite";
...
(of course, replace "&lt;path to sqlite db&gt;" with my actual path)
../application/controllers/test_controller.php:
Code:
&lt;?php
class Test_controller extends Controller {

    function index()
    {
        echo "test 1";
        $this->load->database();
        echo "test 2";
    }
}
?&gt;

I can see "test 1" on my page, but not "test 2". I don't get any error messages or anything. "test.db" is readable by everybody. Any suggestions?


Messages In This Thread
Problem connecting to sqlite database - by El Forum - 06-18-2009, 07:02 PM
Problem connecting to sqlite database - by El Forum - 06-18-2009, 07:30 PM
Problem connecting to sqlite database - by El Forum - 06-18-2009, 07:43 PM
Problem connecting to sqlite database - by El Forum - 06-18-2009, 11:24 PM
Problem connecting to sqlite database - by El Forum - 06-20-2009, 05:53 PM
Problem connecting to sqlite database - by El Forum - 06-20-2009, 07:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB