MySQL combines PHP and MySQL in a reasonable and efficient way to create a sophisticated database site. MySQL is a small, compact data server that supports standard SQL. It can be used in both UNIX and Windows environments.
PHP and MySQL are free open source. Their combination can be developed in Windows and served in UNIX. PHP also supports some other databases including PostgreSQL.
Here's an example:
First of all, you have installed PHP and MySQL. This simple script example reads data from a database and then displays it.
function mysql_connect () refers to a MySQL server that is connected by a user name (or a specified password) on a specified host. Variable $db is used to submit this connection.
mysql_select_db () Specifies the query that the database uses later. The function mysql_query () is to send SQL queries to MySQL for execution, and the result is returned and stored in the variable $result.
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.