Hi,
my question is more about DB/script optimization, because script could(possibly!) work with big number of users/votes/ratings...
My client said that cookies will be fine.
(I know that other ways - sessions and IP tracking have their disadvantages too...)
To be more clear, everyone can vote, there is no registration/login...
And, now i would like your suggestions about implementing of multiple voting prevention...
What you would do? I have several solutions/suggestions:
1) all data stored in cookie(unique id and id's of pictures which has been rated, script should pull off picture id's from cookie)
2) cookie+DB -1.way
All ratings/votes from same user in one field/one row!
TABLE STRUCTURE:
id,unique_id,picture_ids(separated by commas)
for example
1, 1uu2145u55, 1,2,4,5,6
This way is good when there is no too many votes, but you can imagine what will be with number increasing...
(i am using explode() function to get rated images id's)
3) cookie+DB -2.way
EVERY RATING - ONE ROW IN DB
same db structure, but:
id,unique_id,picture_ids(separated by commas)
for example:
1, 1uu2145u55, 1
1, 1uu2145u55, 2
1, 1uu2145u55, 3
Sorry for my English, i hope that you understand what i tried to say.
So, what you would suggest?Is there any other(better) way?
Thanks in advance!