After N days in MySQL
Simply Use INTERVAL function in MySQL to get the date after N days
Syntax
SELECT NOW(), NOW()+INTERVAL 180 DAY;
prints
2012-08-03 10:12:13 20 | 2013-01-30 10:12:13 20
eg: To Insert into DB table use
INSERT INTO myTable (signup_date, exp_date) VALUES (NOW(), NOW() + INTERVAL 180 DAY);
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2013
(219)
-
▼
March
(19)
- Platform Compatibility
- A Quick Play with Google Static Maps: Dallas Crime...
- Function for getting all parents of a child catego...
- .
- Control Structures in PHP: ELSEIF
- Facebook like exchange script
- Javascript in PHP on Windows with php_spidermonkey
- PHP SOAP Extension
- 260 PHP script
- search data in table with user inputs in php with ...
- The best PHP Real estate Portal Software
- if-else-if statement or if else if statement in php
- postgres - from clause in update sql
- PHP Training Institute - Yorex Infotech
- Contador de usuarios activos con PHP
- Date Time Interval in MySQL
- Best practice (optimization)
- The PHP Hypertext Preprocessor (PHP) is a pro...
- 汉博园-GUILTY☆NET-PHP中调用WebService--用soapclient实现PHP实...
-
▼
March
(19)