Home > Article > Backend Development > PHP combines the cross-database query function of ACCESS, phpaccess cross-database_PHP tutorial
Problem Description: Sometimes it is necessary to query and obtain tables in two or three databases through related keywords The required record set cannot be achieved using ordinary SQL query statements, but can be achieved through the cross-database query function of ACCESS.
Solution: For example, the two tables "Content Type" and "Content Material" are in different databases. The specific query method is as follows:
Copy code The code is as follows:
@"Select * from loading material type as a INNER JOIN [;database=" AppDomain.CurrentDomain.BaseDirectory "loading material.zc]. loading material as b ON a.BH=b.LXBH"
Detailed explanation: [;database=path;pwd=12].A
ACCESS's cross-library is implemented through square brackets, including path, password settings, etc.; the premise of cross-library is that a Connection has been opened.
The above is the entire content of this article, I hope you all like it.