sql - Select MySQL data starting from a specific date -
i have player statistics publish dates. @ moment can see statistics in database beginning.
select name, bankmoney bank, playerkills 'player kills', deathcount deaths , aikills 'ai kills', teamkills 'team kills', revivecount revives , capturecount 'territories captured', lastmodified 'last seen' playerinfo join playerstats on playerinfo.uid = playerstats.playeruid order bankmoney desc;
but present statistics start of day , start of week.
how ?
based on spitfire's comments, last 24 hours of data can use interval
, go required number of days want. now()
give time query executed , between allow search between 2 days. part of query be:
where 'last seen' between now() , now() - interval 1 day;
a week require change 1 day 7.
Comments
Post a Comment