Ive just discovered the convenience of having SQLite at my disposal. However, the convenience factor is causing a small problem for me and the way I've set up my database connection objects. In order to provide some semblance of database neutrality and abstraction, I've created a DatabaseUtil.php factory class - the main method, getDBConnection is accessed statically and is meant to return an instance to a database based on the DB type specified in my properties file.
The issue with SQLite is simply that there does not seem to be a way to create an instance of SQLite that is independent of a connected database. This isn't a huge problem per se - it just requires me to pass in an additional argument for SQLite database connections and requires me to know before hand what database I want to connect to.
When creating a mysql connection, a database can be selected later - for example:
$connection = mysql_connect('localhost');
mysql_select_db('exampledb', $connection);
Is there a way to obtain an SQLite connection object without connecting to a specific DB?