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

WBOY
Release: 2016-07-13 09:50:56
Original
835 people have browsed it

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template