Although PHP provides us with a lot of functions, some things are not very convenient to handle. For example, the date-time function provided by PHP is very limited. MySQL provides us with a number of functions for this class. Can I use MySQL functions to handle PHP programs? The author has made the following attempts.
<?php
$data _time= "1998-12-31 23:59:59";
$connect _id=mysql_connect (' localhost ');
$query _id=mysql_query ("Select Date_add (' $data _time ', INTERVAL 1 year)", $connect _id);
$data _time=mysql_result ($query _id,0);
Mysql_close ($connect _id);
echo $data _time;
?>
Extrapolate, we can also use other functions provided by MySQL in the programming process.
Of course MySQL provides the function and its usage please everyone to look up the manual.
Please correct me in the wrong place.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.