| title | PDOStatement::debugDumpParams | Microsoft Docs |
|---|---|
| ms.custom | |
| ms.date | 01/19/2017 |
| ms.prod | sql |
| ms.prod_service | connectivity |
| ms.reviewer | |
| ms.technology | connectivity |
| ms.topic | conceptual |
| ms.assetid | cf156d65-d933-4235-b89a-18e172d61c15 |
| author | David-Engel |
| ms.author | v-daenge |
[!INCLUDEDriver_PHP_Download]
Displays a prepared statement.
bool PDOStatement::debugDumpParams();
Support for PDO was added in version 2.0 of the [!INCLUDEssDriverPHP].
<?php
$database = "AdventureWorks";
$server = "(local)";
$conn = new PDO( "sqlsrv:server=$server ; Database = $database", "", "");
$param = "Owner";
$stmt = $conn->prepare("select * from Person.ContactType where name = :param");
$stmt->execute(array($param));
$stmt->debugDumpParams();
echo "\n\n";
$stmt = $conn->prepare("select * from Person.ContactType where name = ?");
$stmt->execute(array($param));
$stmt->debugDumpParams();
?>