PHP code example of vectorface / mysqlite

1. Go to this page and download the library: Download vectorface/mysqlite 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/ */

    

vectorface / mysqlite example snippets


use Vectorface\MySQLite\MySQLite;

// Create a PDO instance on an SQLite database
$pdo = new PDO('sqlite::memory:');

// Create compatibility functions for use within that database connection.
MySQLite::createFunctions($pdo);

// Use it.
$three = $pdo->query("SELECT BIT_OR(1, 2)")->fetch(PDO::FETCH_COLUMN);
// Wait... That works now?!? What the what?!?

$pdo = MySQLite::createFunctions(new PDO('sqlite::memory:'));


	...
	public static function mysql_foo($foo)
	{
		if ($foo == "foo") {
			return "bar";
		}
		return $foo;
	}
	...