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. Link to comment https://forums.phpfreaks.com/topic/156719-stopping-queries-from-running-for-time-period/ 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. Link to comment https://forums.phpfreaks.com/topic/156719-stopping-queries-from-running-for-time-period/#findComment-825244 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? Link to comment https://forums.phpfreaks.com/topic/156719-stopping-queries-from-running-for-time-period/#findComment-825274 Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 You would just INSERT to that table. Link to comment https://forums.phpfreaks.com/topic/156719-stopping-queries-from-running-for-time-period/#findComment-825278 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.