php教程

Session::sql

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

Session::sql — Execute 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();
?>

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788