共用方式為


PDOStatement::debugDumpParams

下載 PHP 驅動程式

顯示已備妥的陳述式。

語法

  
bool PDOStatement::debugDumpParams();  

備註

Microsoft Drivers for PHP for SQL Server 2.0 版已新增 PDO 支援。

範例

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

另請參閱

PDOStatement 類別

PDO