Get the App
SLTechnology News&Howtos  ›  Database  › 

The method of querying data in two databases at the same time in mysql

Shulou Source: shulou.com Published: 2022-06-01 02:22:22 10月03日 Update

This article is about the method of querying data in both databases in mysql. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

The method of querying data in two databases at the same time in mysql: first open the editor sublime, create a new function chaxun;, and then connect to the database, fill in the user name, password, host name of the database and the database to be used; then fill in the sql statement of the query; finally, open the local server and enter the URL for access test.

The method to query data in two databases at the same time in mysql:

1. Open the editor sublime of php, create a new file, and write comments.

2. Create a new function chaxun.

3. Connect to the database and fill in the user name, password, host name and database to be used.

4. Fill in the sql statement of the query. Select * from test1.

5. To read the queried data, the function we use here is fetch_assoc.

6. Call this function.

7. Open the local server and enter the URL for access test.

Thank you for reading! So much for the method of querying data in two databases at the same time in mysql. I hope the above content can help you to some extent, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Data database query two at the same time method function content host password more server user name editor URL statement service test input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Apple Shulou Technology Shulou Information