Function.mysqli-stmt-bind-result
Aus PHP-Wiki
mysqli_stmt_bind_result
(PHP 5)
mysqli_stmt_bind_result(no version information, might be only in CVS)
stmt->bind_result -- Binds variables to a prepared statement for result storageInhaltsverzeichnis |
Description
Procedural style:
bool mysqli_stnt_bind_result ( object stmt, mixed var1 [, mixed var2, ...])</BR >
Object oriented style (method):
class stmt {</BR >bool bind_result ( mixed var1 [, mixed var2, ...])
</BR >}
mysqli_stmt_bind_result() is used to associate (bind) columns in the result set to variables. When function.mysqli-stmt-fetch is called to fetch data, the MySQL client/server protocol places the data for the bound columns into the specified variables var1, ....
Anmerkung: Note that all columns must be bound prior to calling function.mysqli-stmt-fetch. Depending on column types bound variables can silently change to the corresponding PHP type.
A column can be bound or rebound at any time, even after a result set has been partially retrieved. The new binding takes effect the next time function.mysqli-stmt-fetch is called.
See also
function.mysqli-stmt-bind-param, function.mysqli-stmt-execute, function.mysqli-stmt-fetch, function.mysqli-prepare, function.mysqli-stmt-prepare, function.mysqli-stmt-init, function.mysqli-stmt-errno, function.mysqli-stmt-error
Example
Beispiel 1. Object oriented style
|
Beispiel 2. Procedural style
|
The above examples would produce the following output:
AFG Afghanistan ALB Albania DZA Algeria ASM American Samoa AND Andorra |