Position:Home>Database Development> How to realize date to compare, and implementation shows inside 5 days, show the
How to realize date to compare, and implementation shows inside 5 days, show the
From;  Author:Stand originally

Where To_days(dateandtime) >= (to_days(now()) - $limitdays)

Next $limitdays can be delivered with GET means (majority is to GET means is delivered)

Catch up with at the back of your PHP? Limitdays=5 went to show 10 days inside same also, $limitdasy changes 10 went

Above is to use MYSQL function to get such result, the result of above passes a test, because time is hurried, if code has what problem, follow please post put forward, thank


Still the friend says to use Unix seal to get such result, excuse me which had written such code, stick a dot to come out, for everybody reference is compared, also can check judgement PHP function or the efficiency that MYSQL function achieves are tall



Previous 1 2Next
Previous:Internet practitioner health investigates: The 8 people that become IT are own "
Next:Talk about ADO to visit the difference of different database