in reply to Re^17: CGI Action call
in thread CGI Action call

Have you ever seen this from My SQL manual?>

HANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST } [ WHERE where_condition ] [LIMIT ... ]

GAD!!!Works perfectly

HANDLER users OPEN HANDLER users READ business last

Replies are listed 'Best First'.
Re^19: CGI Action call
by poj (Abbot) on Mar 30, 2018 at 20:32 UTC
    Have you ever seen this from My SQL manual ?
    The HANDLER ... OPEN statement opens a table, making it accessible using subsequent HANDLER ... READ statements. This table object is not shared by other sessions and is not closed until the session calls HANDLER ... CLOSE or the session terminates.

      Worse yet it does not maintain the state during subsequent calls

      Each subsequent all to NEXT returns the same record, the first one

      I guess the table closes after the sub completes executing

      I had hoped it was open until an explicit call to close or "program" termination but them as with always, each call to a sub is separate

      Back to working on maintaining state as I was trying before. My only problem there was skipping same last names.

      Re-invent wheel again

        Example demo cgi of how you could combine the 2 subs into 1 and use OFFSET

        HTML form to test it.

        poj

      But you can lock the table while open correect?