使用示例绑定
<?php
try {
$session = mysql_xdevapi\getSession("mysqlx://user:password@host");
} catch(Exception $e) {
die("无法建立连接:" . $e->getMessage());
}
$stmt = $session->sql("SELECT * FROM table WHERE id=? AND data=?");
$stmt->bind(1);
$stmt->bind("data");
$result = $stmt->execute();
?>