Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.25 KB

File metadata and controls

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