Manuál PHP | ||
---|---|---|
Předcházející | Další |
PDOStatement->bindValue()
(no version information, might be only in CVS)
PDOStatement->bindValue() -- Binds a value to a parameterPopis
class PDOStatement {bool bindValue ( mixed parameter, mixed value [, int data_type] )
}
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was use to prepare the statement.
Seznam parametrů
parameter
Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form
:name
. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter.value
The value to bind to the parameter.
data_type
Explicit data type for the parameter using the PDO::PARAM_* constants.
Příklady
Příklad 2. Execute a prepared statement with question mark placeholders
|
Předcházející | Domů | Další |
PDOStatement->bindParam() | Nahoru |