PHP: sybase_data_seek - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sybase_deadlock_retry_count sybase_connect

Last updated: Fri, 26 Jan 2007

view this page in

# sybase_data_seek

(PHP 3, PHP 4, PHP 5)

sybase_data_seek -- Moves internal row pointer

## Description

bool sybase_data_seek ( resource result_identifier, int row_number )

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

sybase_data_seek() moves the internal row pointer of the Sybase result associated with the specified result identifier to pointer to the specified row number. The next call to sybase_fetch_row() would return that row.

See also sybase_fetch_row().

add a note User Contributed Notes
sybase_data_seek
mark at somewhere dot com
15-Nov-2004 12:54
`Make sure you have a data to seek, else you will get a bad row offset warning.`
verdy_p at wanadoo dot fr
24-Jul-1999 02:33
`Use this function to skip rows in an ordered selection, for example to display only a limited ranges of rows in an HTML page, with "previous" and "next" submission buttons for the navigation. The row number may be stored in a hidden form entry or in the URL associated to the navigation links if you do not want to display forms in your page. This current row number will be submitted back to give the user the option to display other entries from the database.
However, avoid using this function to move randomly in a query result set. Note also that specifying a large number of rows to skip may be a performance issue, because the Sybase client in PHP3 will have to fetch many rows prior to find the requested row. An alternate solution is to use queries which return an ordered unique ID with each row returned, so that queries will use more efficient SQL to retrieve data rows in a BETWEEN condition in the WHERE clause, minimizing the impact of unnecessary fetched rows. Such access methods give much more productive results because it has a lower impact on the SQL server which will return small result sets.
A good way to minimize the impact of this function is to give the user the option to select more specific data with additional search fields, and forbid queries that return too many queries. You may also configure your PHP3 script so that it will limit the number of rows returned instead of providing "previous" and "next" navigation controls. Finally you may give the user an option to specify the number of rows he wants to display, and fix a limit on the specified number, so that no user will be able to display more data than this hardcoded limit in your PHP3 script.`
add a note
sybase_deadlock_retry_count sybase_connect

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST