简体   繁体   English

是否可以将MySQL查询加入PHP ODBC查询? (英国50岁)

[英]Is it possible to join a MySQL query to a PHP ODBC query? (Sage 50 UK)

Please accept my apologies if this has been covered, I have searched Stack Overflow but I am yet to find anything that matches what I want to achieve. 如果已解决此问题,请接受我的歉意。我已经搜索了Stack Overflow,但还没有找到与我想要达到的目标匹配的东西。

I am developing a CRM that connects to Sage 50 UK. 我正在开发连接到Sage 50 UK的CRM。 Sage uses a proprietary database known as a 'flat file'. Sage使用称为“平面文件”的专有数据库。 However, you can run queries against the database using ODBC. 但是,您可以使用ODBC对数据库运行查询。

I am looking to perform a JOIN on the 2 databases, as each database houses certain information that I need to ORDER BY. 我希望在2个数据库上执行JOIN,因为每个数据库都包含我需要进行ORDER BY的某些信息。 I currently have it set up to query the Sage database first, then perform a query on the MySQL database but it's not good enough. 目前,我已设置它先查询Sage数据库,然后在MySQL数据库上执行查询,但这还不够好。

I haven't included any code, as I don't think that'd help in any way. 我没有包含任何代码,因为我认为这不会有任何帮助。 Please correct me if I'm wrong. 如果我错了,请纠正我。

You cannot join between two databases. 您不能在两个数据库之间连接。 You'd have to query both independently and mix the result together in PHP. 您必须独立查询两者,然后在PHP中将结果混合在一起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM