How can I make a limit of showing the results? I need to limit it for 100 views.

In DB I have:

```
ID|NAME|PAGE|COUNT|DATE

```

In count I want to count untill 100 and then stop showing that ID. I could do it with count < 100. And then update the specific ID. I could get records with less than 100 views, but I couldn't manage to update count on the specific ID.

Row is showed with:

php code:

```
foreach($bannerGroups[0] as $ban) {
        echo '<li class="right1">'.$ban->html().'</li>';       
}

```

But I just don't know where to put the update in there. I tried, but all I got was to update only one ID. But it shows 4 on one page and randomizes them on refresh. So I don't know what to do.

Also I would like to say I am only learning php. Sorry for all the mess.

Code at <http://pastebin.com/A9hJTPLE>