i am trying to work with sqlite but cannot connect to it. i have this code:
// Create (connect to) SQLite database in file
$file_db = new PDO("sqlite:C:/sqlite/company.sqlite;dbname=company", "", "");
// Set errormode to exceptions
$result = $file_db->query('SELECT * FROM employees');
var_dump( $result );
with firefox sqlite manager i have created a database named "company" in the folder where my sqlite3.exe is located.
i have an employees table.
then i try to run this and get:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 no such table: employees' in C:\xampp\htdocs\ronnyran\t
php on line 15
what am i doing wrong?