Home  >  Article  >  Backend Development  >  PHP combines the cross-database query function of ACCESS, phpaccess cross-database_PHP tutorial

PHP combines the cross-database query function of ACCESS, phpaccess cross-database_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:50:58851browse

php combines the cross-database query function of ACCESS, phpaccess cross-database

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1015429.htmlTechArticlephp combines the cross-database query function of ACCESS, phpaccess cross-database problem description: Sometimes it is necessary to run two or three databases In the table, query to obtain the required record set through related keywords, and use the general...
Statement:
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