E
E
eXe1en72015-11-27 12:45:42
Survey tools
eXe1en7, 2015-11-27 12:45:42

How to implement voting like in the movie "social network"?

Good afternoon, tell me how best to implement voting on the site,
i.e. I have a folder with pictures, 2 random pictures will be displayed on the page, and users can choose one of them, after that the rating of one picture changes, and the second does not change
the question in next, how to store pictures in order to be able to change the rating, i.e. do you need to create a database or can you somehow do without it? tell me the algorithm to follow

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2015-11-27
@dimonchik2013

A database is just
SQLite and all things
are not a database at all, but you just
need to store the file anyway in something,
for example, you can store the same files with the txt extension nearby and write to them, but when you have to compare "where more" - you have to process everything,
and for such a database it’s more convenient and faster
, and this is for +1 - 1,
and if you build an anti-cheat system (IP, time, browser), then only the
SQLite database is just right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question