To connect to a MySQL database in Fat-FRee FRamework follow these syntaxes:
$db=new\DB\SQL('mysql:host=localhost;port=3306;dbname=mysqldb','username','password');
Connecting to a SQLite database would look like:
$db=new \DB\SQL('sqlite:/path/to/db.sqlite');
The 4th parameter is an array of options you can use to set additional PDO attributes:
$options = array(
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, // generic attribute
\PDO::ATTR_PERSISTENT => TRUE, // we want to use persistent connections
\PDO::MYSQL_ATTR_COMPRESS => TRUE, // MySQL-specific attribute
);
$db = new \DB\SQL('mysql:host=localhost;port=3306;dbname=mysqldb','username','password', $options);