PHP code example of jeremiah-shaulov / pdoi

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

    

jeremiah-shaulov / pdoi example snippets




oi\Pdoi as Pdo;

$db = new Pdo
(	'mysql:host=localhost',
	'root',
	'',
	[	PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
		PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
		PDO::MYSQL_ATTR_MULTI_STATEMENTS => false,
		PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
		PDO::ATTR_PERSISTENT => true,
	]
);

var_dump($db->query("SELECT Connection_id()")->fetchColumn());