Detailed explanation of the usage of php mysql_list_dbs() function

墨辰丷
Release: 2023-03-27 19:22:01
Original
1756 people have browsed it

This article mainly introduces the usage of php mysql_list_dbs() function, briefly introduces the functions of mysql_list_dbs() function and the implementation skills of listing all mysql databases. Friends in need can refer to the following

Example description of this article Learned the usage of php mysql_list_dbs() function. Share it with everyone for your reference, the details are as follows:

mysql_list_dbs() function

Definition: List all databases in the MySQL server

$conn=@mysql_connect("localhost","root","admin")or die(mysql_error());
$db=mysql_list_dbs($conn);
while($result=mysql_fetch_object($db)){
  echo $result->Database."<br>";
}
Copy after login

The above is the entire content of this article, I hope it will be helpful to everyone's study.


Related recommendations:

php-fpm service startup script method

Example of adding service service to php-fpm

##PHPData type conversion (character to number, number to character)

The above is the detailed content of Detailed explanation of the usage of php mysql_list_dbs() function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template