seany123 Posted May 3, 2009 Share Posted May 3, 2009 im making a game and im basically wanting for players to be able to rate other players up and down. however i was wondering how it would be possible to only allow you to rate a single person once per day. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 Have a rate table like - rate id PRIMARY_KEY AUTO_INCREMENT rater int( NOT NULL rated int( NOT NULL rate int(1) ENUM(0, 1) DEFAULT 0 time timestamp rater is the user id of the member who did the rating. rated is the user id of the member who got rated. rate is one of 1 or 0. Then there's a time that records the time the rater rated the user. You can query that. You can also add a field to the member's table if you want, but this is fine. Quote Link to comment Share on other sites More sharing options...
seany123 Posted May 4, 2009 Author Share Posted May 4, 2009 i have set these tables up, how do i link the tables together?? what would the queries and if statements be like? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 You would just INSERT to that table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.