[Solved] turning images into rating system [closed]


Each user should have a record in a users table

users
id,...

Each image should have a record in an image table

images
id,created_date,file_path,...

Each vote should have a record in a junction table that looks like:

image_votes
user_id,image_id,vote_value

where the value is 0 for a down vote, 1 for an upvote, and no record exists for a nonexistent vote

further, for comments you would have a table that looks like

image_comments
id,image_id,user_id,text,created_date

then you could have a simliar voting system for comments

solved turning images into rating system [closed]