Codeigniter Project not working

Trying to get CI3 app going using sqlite3 database
It does not appear Im connecting to the database correctly

my database config file is
$db[‘default’] = array(

'hostname' => '',
'username' => '',
'password' => '',
'database' => 'database.db',
'dbdriver' => 'sqlite3',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE


first error message
A PHP Error was encountered

Severity: Warning

Message: SQLite3::query(): Unable to prepare statement: 1, no such table: yards

Filename: sqlite3/sqlite3_driver.php

Line Number: 129

2nd error message

A Database Error Occurred

Error Number: 1

no such table: yards

SELECT * FROM “yards”

Filename: C:/bee_exe/Data/system/database/DB_driver.php

Line Number: 691

Think I figured it out. I created a Data directory in the EXE folder and put my sqlite3 database file in the Data directory. It appears to be connected now.


In ci3, sqlite databases should be in the “app_folder/Database” folder. you also need to update the config settings if you are using the database for the session.

‘dsn’ => ‘’,
‘database’ => APPPATH.’/Database/topses.db3’,

1 Like