ShoeLace1291 Posted January 5, 2010 Share Posted January 5, 2010 I'm trying to make a spam filter that will get the comment made by the last author. Then I want to get the date and time that the previous comment was made. If the date of the previous comment made by the last author is less than 5 minutes i want to deny the author the right to create the next comment. What row type for date and time should i use in my database table? A better question: What is the best type of date/time column type to use for my comments table to compare one date/time to another? Link to comment https://forums.phpfreaks.com/topic/187219-comparing-database-date-types/ Share on other sites More sharing options...
monkeypaw201 Posted January 5, 2010 Share Posted January 5, 2010 I would reccommend using PHP's time() function and calculate off of that. http://php.net/manual/en/function.time.php Link to comment https://forums.phpfreaks.com/topic/187219-comparing-database-date-types/#findComment-988827 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.