好奇是否可以准备一个语句,绑定它,然后按如下方式预览生成的 SQL(oci_preview_sql函数是一个占位符):
// Glorious declaration of a non-specific query
$statment = oci_parse($handle, "SELECT x FROM y WHERE variable = :value");
// Bind up some variables
oci_bind_by_name($statement, ':value', $value);
...
// Location of interest
oci_preview_sql($statement); // ? is there some method like this?
// Execute it
oci_execute($statement, OCI_DEFAULT);