mysqli_param_count
stmt->param_count
Returns the number of parameter for the given statement
Description
Procedural style:
intmysqli_param_count
objectstmt
Object oriented style (property):
stmt
intparam_count
mysqli_param_count returns the number of parameter
markers present in the prepared statement.
&reftitle.returnvalues;
returns an integer representing the number of parameters.
&reftitle.seealso;
mysqli_prepare
Example
Object oriented style
prepare("SELECT Name FROM Country WHERE Name=? OR Code=?")) {
$marker = $stmt->param_count;
printf("Statement has %d markers.\n", $marker);
/* close statement */
$stmt->close();
}
/* close connection */
$mysqli->close();
?>
]]>
Procedural style
]]>
The above examples would produce the following output: