Home >Backend Development >PHP Tutorial >PHP combines ACCESS's cross-database query function_PHP tutorial

PHP combines ACCESS's cross-database query function_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 09:50:56857browse

php combines the cross-database query function of ACCESS

Problem description: Sometimes it is necessary to query and obtain the required record set through related keywords in the tables of two or three databases. , which cannot be achieved with ordinary SQL query statements, 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:

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1015877.htmlTechArticlePHP combined with ACCESS’s cross-database query function Description of the problem: Sometimes it is necessary to use tables in two or three databases. Query to obtain the required record set through related keywords, and use general SQL query statements...
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