Home > Backend Development > PHP Tutorial > PHP linked database

PHP linked database

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-08 09:24:54
Original
833 people have browsed it

PHP links MySql database
mysql_connect('server','username','password')
mysql_connect() returns the identification of successful database connection.
mysql_slect_db('database name','link')
mysql_slect_db() selects the library used,
mysql_query("sql statement") sql statement can add, delete, modify and query
mysql_query() method of executing sql statement.
mysql_fetch_array ('results from the incoming sql query') returns key/value pairs and index/values ​​
mysql_fetch_assoc ('results from the incoming sql query') only returns key/value pairs
mysql_num_rows() returns the sql query results Head Office

The above has introduced the PHP link database, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template