Skip to main content
Participant
February 1, 2007
Question

how to display the current record of a recordset (using repeat region)

  • February 1, 2007
  • 1 reply
  • 211 views
Hi guys. Can someone tell me how i would simply display the current record of a recordset that is being displayed on screen via 'repeat region'?

I have 3 fields in the database - ID, name, score. It forms a leaderboard. I need to generate the position of each player in the table (ordered by score obviously).

This sounds really simple and probably is.

$row_scorelist[currentrecord] ?

^^ something along those lines, but that actually works.

thanks, P

P.S I'm using PHP/MYSQL
This topic has been closed for replies.

1 reply

Inspiring
February 1, 2007
On Thu, 1 Feb 2007 17:09:12 +0000 (UTC), "PhilB2007"
<webforumsuser@macromedia.com> wrote:

>Hi guys. Can someone tell me how i would simply display the current record of a
>recordset that is being displayed on screen via 'repeat region'?
>
> I have 3 fields in the database - ID, name, score. It forms a leaderboard. I
>need to generate the position of each player in the table (ordered by score
>obviously).
>
> This sounds really simple and probably is.
>
> $row_scorelist[currentrecord] ?
>
> ^^ something along those lines, but that actually works.

before your repeat region starts you need to initialise a variable and
then increment it after each record is displayed:

$counter = 1;

START REPEAT HERE

echo $counter YOUR RECORD HERE

$counter++;

LOOP HERE


--
Steve
steve at flyingtigerwebdesign dot com