[eluser]Kurai[/eluser]
Hi everyone!
I'm trying to build a small message app, in which you can vote for a content.
What I need is a system that enables you to vote each message one time. No star ratings, no other stuff: it's just a "i like this!" feature.
So, I built a table in my db which associates the user_id to the message_id. This way, I can control that the user votes only one time a certain content.
But now I'm stuck!
I would like to show a link if you can vote the content, and don't show anything if you cannot.
I really don't know how to do now. I tried to join the kudos table with the message table, to show which messages were voted (using an outer join), but I obviously end up with a lot of dupes.
Have you got any advice for me?
Thanks!