MySQL check difference in days

I‘ve encountered this problem recently and here’s how I figured it out:

SELECT COUNT(*) FROM pvp_kills WHERE death_killer='Camaroow' AND DATEDIFF(CURRENT_TIMESTAMP(), death_time) <= 1;

There is no period at the end of this blog post

Liked my post? Feel free to share your post with people using one of the links below! Also, subscribe to my feed or follow me on Twitter! Thanks!

StumbleUponDiggTwitterFacebookRedditLinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>