You are describing a while loop.
You can either capture all the rows and process them, 100 at at time, while you have more rows to process,
OR you can create a SQL query, changing the LIMIT command while there are more rows to get
$currentlimit=0;
$getmore=true;
while($getmore){
$query="SELECT *
FROM someTable
LIMIT $currentlimit, 100";
$result=mysql_fetch_array($query);
if(mysql_num_rows()){
//do something;
//increment the limit clause
$currentlimit=$currentlimit+100; //written this way for clarity, could be +=100;
}
else{
//you are done, exit the loop;
$getmore=false;
}
}