How to operate MySQL in PHP

Source: Internet
Author: User
This article mainly introduces how to operate MySQL in PHP, and analyzes common php skills for mysql database connection, query, modification, update, and deletion in the form of instances, the Zend Development environment encoding setting method is included. if you need it, refer to the example in this article to describe how to operate MySQL in PHP. We will share this with you for your reference. The details are as follows:

Set all UTF-8 codes for Zend software

Demo1.php

 

Config. php

 

Demo2.php

 ';} Mysql_close () ;?>

Demo3.php

 '; //} // Echo mysql_field_name ($ result, 2); // name // echo mysql_num_fields ($ result); // 3 for ($ I = 0; $ I
 '; Echo mysql_num_rows ($ result); // how many pieces of data echo are obtained'
'; Echo mysql_get_client_info (); // Obtain MySQL client information // 5.0.51a echo'
'; Echo mysql_get_host_info (); // Obtain MySQL host information // localhost via TCP/IP echo'
'; Echo mysql_get_proto_info (); // Obtain MySQL protocol information // 10 echo'
'; Echo mysql_get_server_info (); // Obtain MySQL server information // 5.0.51b-community-nt-log mysql_close ();?>

For more information about how to use PHP to operate MySQL, see PHP Chinese network!

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.