|
PDOStatement::bindColumn(PHP 5 >= 5.1.0, PECL pdo >= 0.1.0) PDOStatement::bindColumn — Bind a column to a PHP variable Описание
bool PDOStatement::bindColumn
( mixed $column
, mixed &$param
[, int $type
[, int $maxlen
[, mixed $driverdata
]]] )
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 в случае возникновения ошибки. Примеры
Пример #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 Результат выполнения данного примера: apple red 150 banana yellow 175 kiwi green 75 orange orange 150 mango red 200 strawberry red 25 Смотрите также
|
|