602SQL Documentation Index  



integer wb_fetch_into( resource cursor, &variable [, int row_number] )


Identifier of the open cursor, returned by the wb_exec or wb_psql_execute function.
A reference to the variable that will store the read data from a record. The variable will become an array indexed with the column numbers and column names (in capital letters).
Optional parameter specifying the record number that is to be read (starting with 1). If not specified, the current record will be used (see wb_fetch_row). Simultaneously, the next record will be set as the current record.


This function reads the contents of the specified record into an array in PHP. This function may also set the internal pointer to the next record.

WARNING: If you read the value of a variable-length column (BLOB, CLOB etc.), only the beginning of the column value will be read (the length is specified in the global parameter longreadlen), see also Manipulating variable-length types in PHP.

Návratová hodnota

Number of the columns that were read from the database if successful, otherwise it is FALSE.


Display the cursor column names and contents:

while (wb_fetch_into($res, $buff)) {
	for ($i=1; $i<=wb_num_fields($res);$i++){
		echo wb_field_name($res, $i).": $buff[$i]<br>";
	echo "<br>";