SQLite3Stmt::getSQL() - sqlite3数据库类
SQLite3Stmt::getSQL()
(PHP 7 >= 7.4.0)
Get the SQL of the statement
说明
publicSQLite3Stmt::getSQL([bool $expanded=FALSE
]): string Retrieves the SQL of the prepared statement. If$expandedis FALSE
, the unmodified SQL is retrieved. If$expandedis TRUE
, all query parameters are replaced with their bound values, or with an SQLNULL, if not already bound.
参数
$expanded Whether to retrieve the expanded SQL. Passing TRUE
is only supported as of libsqlite 3.14.
返回值
Returns the SQL of the prepared statement,或者在失败时返回FALSE
.
错误/异常
If$expandedis TRUE
, but the libsqlite version is less than 3.14, an error of level E_WARNING
or an Exception is issued, according to SQLite3::enableExceptions().
范例
Inspecting the expanded SQL
以上例程的输出类似于:
string(24) "SELECT 'foo', '42', NULL"
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!