What I'm trying to do is loop through my user database 10 times, selecting 50 users are a time. I just don't know how to increment the users 50 at a time during the loop. So when the Loop is completed 500 users will be selected 50 at a time(I hope that makes sense)
So in the example below when it loops through, the $query should be:
$query = "SELECT FROM users WHERE id BETWEEN 51 AND 101";
$query = "SELECT FROM users WHERE id BETWEEN 102 AND 152";
And so on and so on
for($t=0; $t<10; $t++) {
$query = "SELECT * FROM users WHERE id BETWEEN 1 AND 50";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
//Do some stuff
}
}
I am lost on how to do this.......Thanks in advance