Connecting to a Sqlite

The database connection is established in a global variable called $DBA in the index.php file for convenience, you could put it anywhere as long as it is global and required before any database functionality is required. For testing purpose, you can use the SQLite database type below.

For a custom database hostname and port use the following format in your ENV file


DB_NAME=10.248.228.22/3306:databasename

Examples:

Notice the convention of using the hostname:[path] - in SQLite hostname becomes the local path.

For SQLite database type:


<?php

global $DBA;

//SQLite
$DBA = new \Tina4\DataSQLite3("/home/someplace/my.db");

Powered by ComboStrap