The advanced technique of PHP programming--Using MySQL function

Source: Internet
Author: User
Tags functions connect mysql functions mysql in php programming query
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.

Author email:fancao0515@0451.com
Fancao0515@21cn.com


Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.