wb_psql_send_param

boolean wb_psql_send_param( resource psql, int param_index, mixed param_value [, int value_offset, int value_size ] )
Parameters
-
psql
- Identifier of a prepared SQL statement, the result of the wb_psql_prepare function. Required parameter.
-
param_index
- Index of the parameter value to be sent to the SQL Server. Index of the first parameter is 0, index of the last parameter is one less than the result of the wb_psql_param_count function. Required parameter.
-
param_value
- Value that is sent to the SQL Server. Required parameter.
-
value_offset
- Index of the first character in the param_value that is sent to the SQL Server. Characters (bytes) are indexed from 0.
-
value_size
- Number of characters (bytes) in the param_value that is sent to the SQL Server.
Description
This function sends the parameter value whose index was passed in the param_index parameter to the SQL Server, or this function sends only a part of the parameter value. The direction of this parameter must be IN or INOUT. The parameter value may be sent to the SQL Server only if the prepared SQL statement has not been closed yet (see wb_close).
Returns
TRUE if succesful, otherwise FALSE.
Example
Send an IN parameter value to the SQL Server, execute the statement and read the OUT parameter value.
$psql=wb_psql_prepare($connection,"SELECT name INTO ? FROM Person WHERE ID=?");
wb_psql_send_param($psql, 1 /*second parameter*/, 123 /*parameter value*/);
wb_psql_execute($psql);
echo "name=".wb_psql_get_out_param($psql,0)."\n";
Viz