|
PHP5中文手册
PDOStatement->bindColumn()(PHP 5 >= 5.1.0, PECL pdo:0.1-1.0.3) PDOStatement->bindColumn() — Bind a column to a PHP variable 说明PDOStatement
bool bindColumn
( mixed $column
, mixed &$param
[, int $type
] )
PDOStatement->bindColumn() arranges to have a particular variable bound to a given column in the result-set from a query. Each call to PDOStatement->fetch() or PDOStatement->fetchAll() will update all the variables that are bound to columns.
参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 范例
Example#1 Binding result set output to PHP variables Binding columns in the result set to PHP variables is an effective way to make the data contained in each row immediately available to your application. The following example demonstrates how PDO allows you to bind and retrieve columns with a variety of options and with intelligent defaults.
<?php 上例将输出:
|