php - fetching the current date in sql -


in databse have format of date 'yyyy-mm-dd'.

how can fetch current date in format? , if want calculate date after 1 week how can that.

thanxx in advance. using php , mysql.

you don't need use mysql fetch date if want know current date in php. can use php's date function:

$current_date = date('y-m-d'); 

if want date 1 week now, use strtotime:

$current_date = date('y-m-d', strtotime('+1 week')); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -