How to query mysql database data in php: First use navicat to create a new database and create a table; then add data and connect to the database; then use the [mysql_select_db] function to select the database to be queried; finally, put the file in the browser Just open it in .
How to query mysql database data in php:
1. Use navicat to create a new database database1
2. Create a new table table2 in the database1 database
##3. Add new data in table2 4. Create a new database named mysql_query 5. Use the mysql_connect function to establish a connection with the database on the page6. Use the mysql_select_db function to select the database to be queried 7. Add a query statement for querying the table2 table "
$sql=select * from table2“
Related learning recommendations:
The above is the detailed content of How to query mysql database data in php?. For more information, please follow other related articles on the PHP Chinese website!