Home > Backend Development > PHP Tutorial > PHP connection mysql database code_PHP tutorial

PHP connection mysql database code_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:47:35
Original
828 people have browsed it

Copy code The code is as follows:

mysql_connect("localhost", "root","1981427") //Connect to the server located at localhost, the user name is root
?>


Copy code The code is as follows:

@mysql_connect("localhost", "root","1981427")
or die("Database server connection failed");
?> ;


Copy code The code is as follows:

@ mysql_connect("localhost", "root","1981427") //You need to connect to the database server before selecting the database
or die("Database server connection failed");
@mysql_select_db("test") // Select database mydb
or die("Database does not exist or is unavailable");
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319923.htmlTechArticleCopy the code as follows: ?php mysql_connect("localhost", "root","1981427") //Connect The server located on localhost, the user name is root? Copy the code as follows: ?php @mysql_connect...
source:php.cn
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
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
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