PHP Manual
mysqli_stmt_bind_param
(PHP 5)
mysqli_stmt_bind_param(no version information, might be only in CVS)
stmt->bind_param() -- Binds variables to a prepared statement as parametersDescription
Procedural style:
bool mysqli_stmt_bind_param ( mysqli_stmt stmt, string types, mixed &var1 [, mixed &...] )Object oriented style (method):
class mysqli_stmt {bool bind_param ( string types, mixed &var1 [, mixed &...] )
}
Bind variables for the parameter markers in the SQL statement that was passed to mysqli_prepare().
Note: If data size of a variable exceeds max. allowed packet size (max_allowed_packet), you have to specify b in
typesand use mysqli_stmt_send_long_data() to send the data in packets.
Parameters
stmtProcedural style only: A statement identifier returned by mysqli_stmt_init().
typesA string that contains one or more characters which specify the types for the corresponding bind variables:
var1The number of variables and length of string
typesmust match the parameters in the statement.
Examples
Example 2. Procedural style
|
The above example will output:
1 Row inserted. 1 Row deleted. |
Support PHPRO.ORG
Search
PHPRO.ORG Poll
Warning: Participation in PHPRO.ORG polls may incorrectly lead you to believe your opinions matter.

RSS Feed




