PHP code example of shinjin / pdo
1. Go to this page and download the library: Download shinjin/pdo 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/ */
shinjin / pdo example snippets
php
$connection_parameters = array(
'driver' => 'mysql',
'dbname' => 'dbtest',
'user' => 'shinjin',
'password' => 'awesomepasswd'
);
$db = new Db($connection_parameters);
$statement = 'SELECT * FROM guestbook WHERE id = ?';
$parameters = array(1);
$result = $db->query($statement, $parameters)->fetchAll();