Oracle 5.0 Reference Manual page 2806

Table of Contents

Advertisement

$stmt = $mysqli->prepare("SELECT 'Labskaus' AS _msg FROM DUAL");
$stmt->execute();
$msg = NULL;
$stmt->bind_result($msg);
$stmt->fetch();
var_dump($msg);
?>
The above example will output:
stmt_proxy::execute(resource(256) of type (Mysqlnd Prepared Statement (internal only - you must not modify
)
stmt_proxy::execute returns true
bool(true)
string(8) "Labskaus"
See Also
mysqlnd_uh_set_statement_proxy
mysqli_stmt_execute
20.7.8.8.3.
MysqlndUhPreparedStatement::prepare
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhPreparedStatement::prepare
Prepare an SQL statement for execution
Description
public bool MysqlndUhPreparedStatement::prepare(
mysqlnd_prepared_statement statement,
string query);
Prepare an SQL statement for execution.
Parameters
statement
query
Return Values
Returns
TRUE
Examples
Example 20.387.
<?php
class stmt_proxy extends MysqlndUhPreparedStatement {
public function prepare($res, $query) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$query = "SELECT 'No more you-know-what-I-mean for lunch, please' AS _msg FROM DUAL";
$ret = parent::prepare($res, $query);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
var_dump($ret);
Mysqlnd user handler plugin (mysqlnd_uh)
Mysqlnd prepared statement handle. Do not modify! Resource of
type
Mysqlnd Prepared Statement (internal only -
you must not modify
The query to be prepared.
on success. Otherwise, returns
MysqlndUhPreparedStatement::prepare
it!).
FALSE
example
2786

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents