略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SqlStatement::bind

2024-12-21

SqlStatement::bind

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

SqlStatement::bindBind statement parameters

说明

public mysql_xdevapi\SqlStatement::bind(string $param): mysql_xdevapi\SqlStatement

警告

本函数还未编写文档,仅有参数列表。

参数

param

返回值

范例

示例 #1 mysql_xdevapi\SqlStatement::bind() example

<?php

/* ... */

?>
add a noteadd a note

User Contributed Notes 1 note

up
0
me25show at gmail dot com
3 years ago
bind using example:
<?php
try {
   
$session = mysql_xdevapi\getSession("mysqlx://user:password@host");
} catch(
Exception $e) {
    die(
"Connection could not be established: " . $e->getMessage());
}
$stmt = $session->sql("SELECT * FROM table WHERE id=? AND data=?");
$stmt->bind(1);
$stmt->bind("data");
$result = $stmt->execute();

?>

官方地址:https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.bind.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3