I have to write a procedure which will accept a record type and the
number of records to return to the calling PHP script.
We have a similar script which gets data from a single query and opens
a SELECT statement for PHP like this: OPEN line FOR v_query;
But in this case, I may get multiple pairs of parameters at one time.
So, it may be where I have to return 3 records of type 1 and 4 records
of type 2 and 6 records of type 3.
This is a PHP script calling this Oracle procedure. I'm having rouble
writing a single query which can be opened for select that contains
both the record type to retrieve and the number of records for that
type.
If I use some kind of loop, it will not work for opening the query to
PHP.
I'm looking for any suggestions someone may have.