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.

锟斤拷锟斤拷

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

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

$session->sql("CREATE DATABASE addressbook")->execute();
?>