aliento Posted January 6, 2010 Share Posted January 6, 2010 I make an auction site, i want to see if any auction has expired and if it ends set the `status` entry to 'closed' . I use Unix timestamps saved to the `auctions` table. This table has and one field `staus` which has to change if the field `published_time` have expired. Any help ? My thought was to ask db which have expired save the ids to an array and then make the update . But this is very expensive i hope there is a juggling which do it at once. Link to comment https://forums.phpfreaks.com/topic/187503-time-easue/ Share on other sites More sharing options...
whansen02 Posted January 7, 2010 Share Posted January 7, 2010 update set status = closed where (published_time > allowed_time) Or something to that affect. If you design your database layout right it's not a very costly query. And really you shouldn't have to worry about that too much unless this auction site was super sized. Link to comment https://forums.phpfreaks.com/topic/187503-time-easue/#findComment-990049 Share on other sites More sharing options...
aliento Posted January 7, 2010 Author Share Posted January 7, 2010 no it is not so big but i want to design it ... I will try it tomorrow , thanks Link to comment https://forums.phpfreaks.com/topic/187503-time-easue/#findComment-990076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.