Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Random returns and More pages


Message #1 by Jefferis Peterson <jefferis@p...> on Thu, 19 Sep 2002 09:45:38 -0400
A simple solution is to store the page number and define a constant which
holds the number of items per page. Return the entire recordset and jump to
the record that you want, loop for the number of items per page. There are
better ways  to do this in ASP, but I am afraid that I do not know of a
better way to do this in php. There may be a php function to return a
limited number of rows from a query.

regards
David Cameron
nOw.b2b
dcameron@i...

> -----Original Message-----
> From: Alan Reinhart [mailto:avres@c...]
> Sent: Friday, 20 September 2002 12:22 AM
> To: sql language
> Subject: [sql_language] Re: Random returns and More pages
> 
> 
> on 9/19/02 10:09 AM, Jefferis Peterson at 
> jefferis@p... wrote:
> 
> > Okay, but that isn't telling me the process. I could issue 
> a call Select ID
> > From Catalog Where Like "%yellow%diamonds%" Limit 10, but 
> if the process is
> > random, how do you prohibit the next iteration from 
> returning the previously
> > selected items? 
> 
> Well - not familiar with your clienting/frontend tool, but each SELECT
> issued to the back end should be done under a some kind of unique
> transaction ID. That is how multiple operation are kept 
> distinct. In Studio
> when you begin a new transaction, you assign some free text to as the
> transaction ID. So if you did a SELECT on transaction ID 'TI0001' the
> results of that SELECT will sit on the server until it sees a FETCH on
> transaction 'TI0001' and all records have been sent to the 
> client, or the
> transaction is cleared.
> 
> Don't forget you have a SESSION also - each user can log on 
> with a SESSION,
> and within that SESSION issue any number of transactions. 
> Studio offers a
> SESSION POOL feature to allow easy reuse of these resources 
> when doing web
> access.
> 
> =Alan R.
> 
> 
> 


  Return to Index