Welcome to WebmasterWorld Guest from 3.81.29.226

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

100 rows at a time, query

     
2:11 am on Mar 13, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 29, 2003
posts:94
votes: 0


Can someone point me in the right direction,

Im running a multithreading curl script that proccess' 1000 urls, i need to select the urls from db 100 at a time, so limit 0,100 then when curl's finished limit 100,100 and so on, any ideas how to do this loop, its not pages and runs background.

thanks

7:38 am on Mar 13, 2007 (gmt 0)

New User

10+ Year Member

joined:Dec 28, 2006
posts:3
votes: 0


Do you mean something like this?

$i = 0;
$ii = 100;

While ($ii < 1000) {

$query = "SELECT url FROM database LIMIT $i, $ii";

$i = $i+100;
$ii = $ii+100;

}

11:50 pm on Mar 13, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 29, 2003
posts: 94
votes: 0


i needed it to still work if the total was over 1000, got a count from the table and your idea works just fine.

Many Thanks