Jump to content

limit query to x amount per line then execute command


remybink

Recommended Posts

I see so much about pagination, but what is it called or what is the function to create a "break" after "x" amount of results? I am going to sit here until this website is complete, times are tough and I must launch a better website.

 

Thank you for any help you guys can and did offer.

Then just implement that in your code that processes the results

$group_records = 5;
$recordCount = 0;
while($row = mysql_fetch_assoc($result))
{
    $recordCount++;

    //Display the record

    if($recordCount%$group_records == 0)
    {
         //Display something between each group of records
    }

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.