Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.25 KB

pdostatement-debugdumpparams.md

File metadata and controls

52 lines (38 loc) · 1.25 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic
PDOStatement::debugDumpParams
API reference for the PDOStatement::debugDumpParams function in the Microsoft PDO_SQLSRV Driver for PHP for SQL Server.
David-Engel
davidengel
08/10/2020
sql
connectivity
reference

PDOStatement::debugDumpParams

[!INCLUDEDriver_PHP_Download]

Displays a prepared statement.

Syntax

  
bool PDOStatement::debugDumpParams();  

Remarks

Support for PDO was added in version 2.0 of the [!INCLUDEssDriverPHP].

Example

<?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();  
?>  

See Also

PDOStatement Class

PDO