OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Resetting DAOResultFactory cursor to beginning of ResultSet

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Resetting DAOResultFactory cursor to beginning of ResultSet

Postby christo » Thu Oct 25, 2007 1:44 am

Hi

Is it possible to set the pointer back to the beginning of a resultset? sometihng similar to mysql_data_seek(0) ?
christo
 
Posts: 22
Joined: Mon Jan 09, 2006 12:04 am
Location: Grahamstown, South Africa

Re: Resetting DAOResultFactory cursor to beginning of ResultSet

Postby asmecher » Thu Oct 25, 2007 9:27 am

Hi Christo,

Nothing in the current API, but it could probably added. Generally, if you need to seek through a ResultSet, I'd suggest converting it to an array (via the to_array function). The only down-side to this approach is the memory required to hold all elements in memory for large lists.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest