mysql_xdevapi\Session
PHP Manual

Session::executeSql

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

Session::executeSqlExecute an SQL statement

说明

public Object mysql_xdevapi\Session::executeSql ( string $statement )

Execute an SQL statement, similar to executing the sql() and execute() methods.

参数

statement

SQL statement to execute

返回值

An SqlStatementResult object on success, or throws an Exception if the SQL statement fails.

范例

Example #1 mysql_xdevapi\Session::executeSql() example

<?php
$session 
mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$session->executeSql("CREATE DATABASE addressbook");

mysql_xdevapi\Session
PHP Manual