Hi Mark,
if you use rowno <=1 in your where clause your resultset contains only one row. It is not possible to walk through a table you can only walk through resultsets.
 
If you build an array of rows and you use the SQLExtendedFetch functionality with next, first, last, previous the odbc driver fetches only the number of rows specified by rowsetsize.
If you set the rowsetsize to 1 the odbc driver doesn't fetch the unnecessary rows.
 
Regards Burkhard
 
----
Burkhard Diesing
SAP DB, SAP Labs Berlin
 
-----Original Message-----
From: Evove, Inc. [mailto:[EMAIL PROTECTED]]
Sent: Montag, 15. Oktober 2001 03:18
To: sapdb
Subject: ODBC & PHP to select first, last, next, previous

With the limited command set of PHP for ODBC, is it possible to select a row and then select next, previous, etc.
 
I have a select statement with a WHERE clause and I only want to retrieve 1 row from the table and then allow the user to walk through the dataset.
 
I have used the rowno <= 1 to get just 1 row, but when I ORDER BY ... DESC the rowno does not work so I can not get the last row.
 
Also I am unable to get next and then previous without building an array of all rows that match the WHERE clause and then walking through the array. I am working with a lot of data unneccesarily.
 
Thanks in advance,
Mark Bruk

Reply via email to