> What is the prefered way to realise a "cursor" scenario in a > SAPDB ODBC > PHP environment. Cursor scenario means there is a screen > which displayes > a subset of all fields of one dataset (all data of one row of > a database > table). With a NEXT and a PREVIOUS button I should be able to > scroll throu > all datasets (rows). The rows can be ordered by any database > field -> there > is no general available row numbering.
Create a new table shaped liked the cursor - with a unique name (session id) - with a key column for the row number Copy the cursor rows into the new table. Then you can display pages simply by SELECT ... from <sessionid> where rownumber between :pagestart and :pageend If you can manipulate the original select by inserting a "rowno, " after the SELECT (e.g. SELECT rowno, * from messages), you can even try a INSERT ... SELECT, thus letting the database to the copying. This doesn't work yet for LONG columns. The problem with this approach is of course that you have to decide when to drop these additional tables, otherwise, your database will soon overflow. Daniel Dittmar -- Daniel Dittmar SAP DB, SAP Labs Berlin [EMAIL PROTECTED] http://www.sapdb.org/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
