I have a user that enters a piece of data into my database and titles it "Widget Title". If he calls another item "Widget Title", and another, and another, when he sees them in his widget list I'd like to show them like such:
- Some Item
- Widget Title
- Some Other Item
- Widget Title 2
- Widget Title 3
- Yet Another Item
- Widget Title 4
Where each duplicate occurrence has its own appended incrementing id.
Would you do this on the way into the database or when you display the output for the list?
Can I have the algorithm?