Home  >  Article  >  Backend Development  >  PHP 5619 connects to the database. Unable to connect to the database. How to connect to the database. plsql connects to the database.

PHP 5619 connects to the database. Unable to connect to the database. How to connect to the database. plsql connects to the database.

WBOY
WBOYOriginal
2016-07-29 08:55:001286browse

It is not recommended to use mysql_connect, mysql_query and other functions in PHP5.3 and above versions. Instead, use the mysqli series (improved). This is an example of connecting to a database and querying data.

';
	while($row=mysqli_fetch_assoc($result)){
		
		echo $row["name"]." ".$row["surname"].'
'; } mysqli_free_result($result); } else{ echo "the query is not executed.".'
'; } mysqli_close($link); ?>

The above introduces PHP 5619 to connect to the database, including the content of connecting to the database. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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