Bind a parameter to the query. A parameter is denoted in the query string passed to
create by
$i, where
i is the rank of the parameter, beginning with 1. The parameters are set consecutively by calling this method
bind. The
ith variable is set by the
ith call to the
bind method. If any of the
$i are not set by a call to
bind at the point
execute is called,
QueryParameterCountInvalidException is thrown. The parameters must be objects, and the result is an
Object. Objects must be used instead of primitive types (
Integer instead of
int) for passing the parameters.
If the parameter is of the wrong type, QueryParameterTypeInvalidException is thrown. After executing a query, the parameter list is reset.
@parameter A value to be substituted for a query parameter.
@exception QueryParameterCountInvalidException The number of calls tobind has exceeded the number of parameters in the query.
@exception QueryParameterTypeInvalidException The type of the parameter doesnot correspond with the type of the parameter in the query.