Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sybase_fetch_row(3) [php man page]

SYBASE_FETCH_ROW(3)													       SYBASE_FETCH_ROW(3)

sybase_fetch_row - Get a result row as an enumerated array

SYNOPSIS
array sybase_fetch_row (resource $result) DESCRIPTION
sybase_fetch_row(3) fetches one row of data from the result associated with the specified result identifier. Subsequent call to sybase_fetch_row(3) would return the next row in the result set, or FALSE if there are no more rows. PARAMETERS
o $result - RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. Each result column is stored in an array offset, starting at offset 0. Data types +-------+---------------------------------------------------+ | PHP | | | | | | | Sybase | | | | +-------+---------------------------------------------------+ |string | | | | | | | VARCHAR, TEXT, CHAR, IMAGE, BINARY, VARBINARY, | | | DATETIME | | | | | int | | | | | | | NUMERIC (w/o precision), DECIMAL (w/o precision), | | | INT, BIT, TINYINT, SMALLINT | | | | |float | | | | | | | NUMERIC (w/ precision), DECIMAL (w/ precision), | | | REAL, FLOAT, MONEY | | | | | | | | NULL | | | | | | | NULL | | | | +-------+---------------------------------------------------+ SEE ALSO
sybase_fetch_array(3), sybase_fetch_assoc(3), sybase_fetch_object(3), sybase_data_seek(3), sybase_result(3). PHP Documentation Group SYBASE_FETCH_ROW(3)

Check Out this Related Man Page

SYBASE_UNBUFFERED_QUERY(3)												SYBASE_UNBUFFERED_QUERY(3)

sybase_unbuffered_query - Send a Sybase query and do not block

SYNOPSIS
resource sybase_unbuffered_query (string $query, resource $link_identifier, [bool $store_result]) DESCRIPTION
sybase_unbuffered_query(3) sends a query to the currently active database on the server that's associated with the specified link identi- fier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if sybase_connect(3) was called, and use it. Unlike sybase_query(3), sybase_unbuffered_query(3) reads only the first row of the result set. sybase_fetch_array(3) and similar function read more rows as needed. sybase_data_seek(3) reads up to the target row. The behavior may produce better performance for large result sets. sybase_num_rows(3) will only return the correct number of rows if all result sets have been read. To Sybase, the number of rows is not known and is therefore computed by the client implementation. Note If you don't read all of the resultsets prior to executing the next query, PHP will raise a warning and cancel all of the pending results. To get rid of this, use sybase_free_result(3) which will cancel pending results of an unbuffered query. PARAMETERS
o $query - o $link_identifier - o $store_result - The optional $store_result can be FALSE to indicate the resultsets shouldn't be fetched into memory, thus minimizing memory usage which is particularly interesting with very large resultsets. RETURN VALUES
Returns a positive Sybase result identifier on success, or FALSE on error. EXAMPLES
Example #1 sybase_unbuffered_query(3) example <?php $dbh = sybase_connect('SYBASE', '', ''); $q = sybase_unbuffered_query('select firstname, lastname from huge_table', $dbh, false); sybase_data_seek($q, 10000); $i = 0; while ($row = sybase_fetch_row($q)) { echo $row[0], ' ', $row[1], '<br />'; if ($i++ > 40000) { break; } } sybase_free_result($q); sybase_close($dbh); ?> NOTES
Note This function is only available when using the CT library interface to Sybase, and not with the DB library. SEE ALSO
sybase_query(3). PHP Documentation Group SYBASE_UNBUFFERED_QUERY(3)
Man Page