Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report