livewire1974 — 2010-04-28T06:25:31-04:00 — #1
I was to read the first 2 records on a recordset at the start of a php script, the next 3 later in the script and another 4 later. Is there a way to do this or must I read all the records into an array at the start and then take the records I want from the array ?
Thanks in advance.
guido2004 — 2010-04-28T06:39:30-04:00 — #2
You can do both. But in this case it might be better to load the records in an array. At least you'll have the entire query handling in one specific part of the script, and not scattered around.
livewire1974 — 2010-04-28T06:43:41-04:00 — #3
anthonysterling — 2010-04-28T06:47:23-04:00 — #4
Assuming mysql, you could look at mysql_data_seek().
livewire1974 — 2010-04-28T06:53:07-04:00 — #5
Thanks Anthony, thats exactly what I am looking for.