PHP - Manual: Session::sql
2024-11-14
(No version information available, might only be in Git)
Session::sql — Execute SQL query
Create a native SQL statement. Placeholders are supported using the native "?" syntax.
Use the execute
method to execute the SQL statement.
query
SQL statement to execute.
An SqlStatement object.
示例 #1 mysql_xdevapi\Session::sql() example
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$session->sql("CREATE DATABASE addressbook")->execute();
?>
官方地址:https://www.php.net/manual/en/mysql-xdevapi-session.sql.php