# Retrieve by sets

**URL:** <https://forum.kirupa.com/t/retrieve-by-sets/152742>\
**Category:** Uncategorized\
**Created:** [June 27, 2005, 3:20am UTC](https://forum.kirupa.com/t/retrieve-by-sets/152742 "2005-06-27T03:20:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frg10](https://avatars.discourse-cdn.com/v4/letter/f/439d5e/32.png) [@Frg10](https://forum.kirupa.com/u/Frg10)\
**Post date:** [June 27, 2005, 3:20am UTC](https://forum.kirupa.com/t/retrieve-by-sets/152742/1 "2005-06-27T03:20:18Z")

</div>

hi. i am creating a control panel where it gets conversations from mySQL database. the problem is that flash gets the whole data from database and its taking a long time to download them. what i did is count all datas and place set on the bottom of the page where you can select what set you would like to view. my problem is i dont know how to spin my php where it will only get the set that is requested.

e.g.  
sets **[color=red]1[/color]** | 2 | 3 | 4

if 1 is selected will show records 1 to 10

if 2 is 11 - 20 etc.

anyway, here is a part of the script that works loading everything to flash:

$qr = [color=blue]mysql\_query[/color][color=red]("SELECT \* FROM records WHERE clientID = ‘$thisClient’ ORDER BY $sortBy $order ")[/color];

$nrows = [color=blue]mysql\_num\_rows/color;  
$rString = [color=red]“n=”[/color].$nrows;  
for ($i=[color=red]0[/color]; $i \< $nrows; $i++) {  
$row = [color=blue]mysql\_fetch\_array/color;  
$rString .= [color=red]"&idno"[/color].$i.[color=red]"="[/color].$row[[color=red]‘idno’[/color]].[color=red]"&visitor"[/color].$i.[color=red]"="[/color].$row[[color=red]‘visitor’[/color]];  
$rString .= [color=red]"&stamp"[/color].$i.[color=red]"="[/color].$row[[color=red]‘stamp’[/color]].[color=red]"&record"[/color].$i.[color=red]"="[/color].$row[[color=red]‘record’[/color]].[color=red]"&status"[/color].$i.[color=red]"="[/color].$row[[color=red]‘status’[/color]];  
}  
[color=blue]echo[/color] $rString;  
$query = [color=blue]mysql\_query[/color]([color=red]"[/color][color=red]SELECT \* FROM records WHERE clientID = ‘$thisClient’ “[/color]);  
$numRows = [color=blue]mysql\_num\_rows/color;  
[color=blue]echo[/color] [color=red]”&hehe=$numRows"[/color];  
?\>
