1. Go to this page and download the library: Download mugomes/miphantdblite library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mugomes / miphantdblite example snippets
use MiPhantDBLite\database;
$db = new database(
'database.sqlite',
true // modo sandbox (erros exibidos na tela)
);
$db = new database(
'database.sqlite',
false,
database::READWRITE | database::CREATEONLY
);
use MiPhantDBLite\select;
$select = new select('database.sqlite');
$select->table('users')
->column('id')
->column('name')
->where('status', 'ativo')
->order('name')
->limit(0, 10)
->select();
while ($row = $select->fetch()) {
echo $row['name'];
}
$select->close();