602SQL Documentation Index  

wb_fetch_row

PHP

boolean wb_fetch_row( resource cursor [, integer row_number] )


Parametry

cursor
Identifier of the open cursor, returned by the wb_exec or wb_psql_execute function.
row_number
The record number that will be set as the current record. If not specified, the first record will be set during the first call, and the following records will be set for future calls. Enumeration begins with 1.


Popis

This function sets the current record. Any consecutive calls to the wb_result function will read data from the record that was set by this function.



Návratová hodnota

TRUE if successful, otherwise it is FALSE (including the "record doesn't exist" error).



Příklad

Display the content of the query:

$cursor=wb_exec($conn, "select * from salesreport");
while (wb_fetch_row($cursor))
	{
	 echo( wb_result($cursor, 1).": <i>".wb_result($cursor, 2)."</i></br>");
	}