PHP code example of panique / pdo-debug

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

    

panique / pdo-debug example snippets


$sql = "INSERT INTO test (col1, col2, col3) VALUES (:col1, :col2, :col3)";

$query->execute(array(':col1' => $param_1, ':col2' => $param_2, ':col3' => $param_3));

$parameters = array(
    'param1' => 'hello',
    'param2' => 123,
    'param3' => null
);

$sql = "INSERT INTO test (col1, col2, col3) VALUES (:param1, :param2, :param3)";
$query = $database_connection->prepare($sql);
$query->execute($parameters);

echo PdoDebugger::show($sql, $parameters);