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
Post a Comment