略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Session::sql

2024-11-14

Session::sql

(No version information available, might only be in Git)

Session::sqlExecute SQL query

说明

public mysql_xdevapi\Session::sql(string $query): mysql_xdevapi\SqlStatement

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();
?>
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mysql-xdevapi-session.sql.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3