602SQL Documentation Index  

wb_psql_param_count

PHP

int wb_psql_param_count( resource psql )


Parameters

psql
Identifier of a prepared SQL statement, the result of the wb_psql_prepare function. Required parameter.


Description

This function returns the count of parameters of a prepared SQL statement, whose identifier (resource handle) was passed in the psql parameter.

The parameter count may be retrieved only if the prepared SQL statement has not closed yet (see wb_close).



Returns

Returns the count of parameters of a prepared SQL statement, otherwise FALSE.



Example

Get the parameter count of a SQL statement.

$psql=wb_psql_prepare($connection,"SELECT name INTO ? FROM Person WHERE ID=?");
echo "SQL statement contains ".wb_psql_param_count($psql)." parameters.\n";    

Viz