Semi-OT: GETNEXT methodology in SQL?

Jose Lerebours fp at fpgroups.com
Tue Jun 9 18:35:15 PDT 2009


Fairlight wrote:
> Okay, mark your calendars, because I'm going to actually be complimentary
> to filePro.
>
> fP makes "stepping through" your records dead simple, whether they contain
> unique data fields or not.  GETNEXT is a bit of a Godsend.
>
> Unfortunately, I need to emulate this behaviour in mysql, and I'm coming
> up blank.  Anyone have experience with both and know the methodology for
> emulating a GETNEXT loop in mysql?  I need a data worm that can work on
> a record-by-record basis on a table that was designed poorly with no
> guaranteed unique values in place--in EVERY SINGLE TABLE.  So I need a
> general methodology for emulating this, not one based on one table schema.
>
> I've already got a feeler out in a more SQL-oriented community.  However,
> the methodology I need to use is so fP-centric that I figured it made sense
> to ask here, as anyone here that's ever done a LOOKUP/GETNEXT loop should
> know exactly what it is I'm wanting to do.  So it made sense to ask here as
> well.
>
> Thanks in advance to anyone that knows both sides of the road and can help.
>
> mark->
>   
I wrote this a while back in PHP.  I was very simple. The first thing I 
did was to render data grid on a
browse like format.  From the resulting query I created an array with 
unique IDs for each row.  This array
of course was kept in a session variable.  When the user expanded the 
record (full view mode), by virtue
of associating the unique ID to the row and the row number within the 
array, I know the Next and Prev record IDs.

So, with this information I placed links which will trigger a query 
(AJAX) to retrieve the adequate  record
based on chosen option.

I remember I included links to choose alpha A - Z so that query will 
retrieve records based on chosen
letter  -   Say for instance, if you were browsing through your vendor 
list and you were looking for
vendors that started with C, you will simply click on the  < C > link 
and up came your query.

Funny thing is that I wrote this for the same reasons you stated here 
... Given that I have used filePro for
such a long time, I wrote this PHP application to emulate much of the 
filePro features I have grown used
to.

Good luck!


-- 

Jose Lerebours
http://www.fpgroups.com
(954) 559-7186
fp at fpgroups.com
fpgroups at gmail.com
PHP & filePro Custom Solution Provider


More information about the Filepro-list mailing list