(No version information available, might only be in Git)
Session::sql — Execute SQL query
$query
)Create a native SQL command. Placeholders are supported using the native "?" syntax. Execute an SQL query.
本函数还未编写文档,仅有参数列表。
query
SQL statement to execute.
An SqlStatement object.
Example #1 mysql_xdevapi\Session::sql() example
<?php
$res = $session->sql("insert into test_db.test_table values ('Carlos',9999)")->execute();
$res = $session->sql("select age, age/2 as x from test_db.test_table limit 2")->execute();
$res = $session->sql("select * from $db.test_table where age < ? order by age desc limit ?")->bind(14)->bind(2)->execute();
?>