Popisarray sesam_fetch_row ( string result_id [, int whence [, int offset]] )
Fetches one row of data from the result associated with the specified result identifier. The row is returned as an array (indexed by values between 0 and $array["count"]-1). Fields may be empty, so you must check for the existence of a field by using the isset() function. The type of the returned fields depend on the respective SQL type declared for its column (see SESAM overview for the conversions applied). SESAM "multiple fields" are "inlined" and treated like a sequence of columns.
The number of columns in the result set is returned in an associative array element $array["count"]. Because some of the result columns may be empty, the count() function can not be used on the result row returned by sesam_fetch_row().
Subsequent calls to sesam_fetch_row() would return the next (or prior, or n'th next/prior, depending on the scroll attributes) row in the result set, or FALSE if there are no more rows.
A valid result id returned by sesam_query().
whenceis an optional parameter for a fetch operation on "scrollable" cursors, which can be set to the following predefined constants:This parameter is only valid for "scrollable" cursors.
Tabulka 1. Valid values for
Value Constant Meaning 0 SESAM_SEEK_NEXT read sequentially (after fetch, the internal default is set to SESAM_SEEK_NEXT) 1 SESAM_SEEK_PRIOR read sequentially backwards (after fetch, the internal default is set to SESAM_SEEK_PRIOR) 2 SESAM_SEEK_FIRST rewind to first row (after fetch, the default is set to SESAM_SEEK_NEXT) 3 SESAM_SEEK_LAST seek to last row (after fetch, the default is set to SESAM_SEEK_PRIOR) 4 SESAM_SEEK_ABSOLUTE seek to absolute row number given as
offset(Zero-based. After fetch, the internal default is set to SESAM_SEEK_ABSOLUTE, and the internal offset value is auto-incremented)
5 SESAM_SEEK_RELATIVE seek relative to current scroll position, where
offsetcan be a positive or negative offset value.
When using "scrollable" cursors, the cursor can be freely positioned on the result set. If the
whenceparameter is omitted, the global default values for the scrolling type (initialized to: SESAM_SEEK_NEXT, and settable by sesam_seek_row()) are used. If
whenceis supplied, its value replaces the global default.
Only evaluated (and required) if
whenceis either SESAM_SEEK_RELATIVE or SESAM_SEEK_ABSOLUTE. This parameter is only valid for "scrollable" cursors.
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.