Associating a number with each row returned

Users on my website can post testimonials about their experiences with essential oils. Sometimes a user will post more than one testimonial in one day. The meta-description of each page is dynamically generated using this format:

Bill Jone’s testimonial regarding essential oils was posted on 05-14-2006 and is one of thousands in the searchable database.

The problem here is that Google Webmaster Tools is reporting that it doesn’t like to see multiple pages using the same meta-description. So I would like to come up with a remedy that counts how many testimonials a user has submitted and then word the meta-description like this:

Bill Jone’s first testimonial regarding essential oils was posted on 05-14-2006 and is one of thousands in the searchable database.
Bill Jone’s second testimonial regarding essential oils was posted on 05-14-2006 and is one of thousands in the searchable database.
Bill Jone’s third testimonial regarding essential oils was posted on 05-14-2006 and is one of thousands in the searchable database.

The problem is, I don’t even know the best way to do this using mySQL. Any suggestions?

Thanks!

you’ll need to add a counter (integer column) to the testimonials table

and you’ll need to update this using application code (php or whatever) when you add a testimonial

Ok, I can see how your idea could be handy for all future testimonials that are posted. But what about the 6,000+ that are already in the DB?

Thanks!

you would modify the logic slightly and run it against the database to assign those numbers through the application – perhaps using a cursor (in a one-shot update)