Not sure if you've already found a solution to this but there is a Progress article on how to do this.
Quick Guide To Setting Up MultiDatabase ODBC Connectivity
I had a similar requirement - I wanted to create a join between a table in the primary QAD database and a custom table in our custom database. I have tested this and it works well although my setup is slightly different. I needed to connect to QAD from Microsoft SSRS to create reports against the QAD data - I needed to create some reports that the standard QAD report designer could not handle.
I have tested this on Progress 10.1c (this method is only supported in 10.1b+).
So the steps I took were:
- Create the oesql.properties config file as per the article relevant to the primary and custom databases.
- Create the ODBC System DSN on the client machine (in my case a Windows Server 2008 R2 machine running SQL Server 2008 R2 with SSRS) with the additional database references as per the article.
- Create a Linked Server in SQL Server via the ODBC DSN
- Create a view which uses the OpenQuery syntax to extract data from QAD (in my case this was created in the ReportServer database) via the linked server.
- Create standard T-SQL query using the view in point 3 as the data source. This was ultimately the datasource for my SSRS report.
I believe it is important that the bit versions of the OS/Database and the ODBC drivers match but haven't confirmed this yet.
Whilst my requirement is different to your's ultimately it's the QAD server config and ODBC setup that's key. As long as your PHP client can perform a similar capability in terms of the OpenQuery command then you may get this working. I don't have any experience with PHP so can't help you there.
It seems a bit convoluted but actually works very well and in a lot of cases actually outperforms querying data using QAD browses!
Hope this helps.
Edit:
Here's a sample of an OpenQuery command - you can see that the table joins work in the normal way but just require and additional piece in the table reference.
CREATE VIEW [dbo].[vQADData] AS SELECT * FROM OPENQUERY(LinkedServerName,
'
SELECT custTable.item_date AS DESP_DATE, so_mstr.so_site AS SITE, so_mstr.so_po AS PO_NO, so_mstr.so_inv_nbr AS INV_NO,
ad_mstr.ad_name AS ADNAME, ad_mstr.ad_city AS ADCITY, ad_mstr.ad_state AS ADSTATE
FROM customdbname.pub.customtable custTable
INNER JOIN pub.so_mstr ON so_mstr.so_nbr = custTable.so_nbr
INNER JOIN pub.ad_mstr ON ad_mstr.ad_addr = so_mstr.so_ship
INNER JOIN pub.sod_det ON sod_det.sod_nbr = custTable.so_nbr
WHERE so_mstr.so_site = ''SiteName'' AND so_mstr.so_shipvia = ''SHIPPER'' AND custTable.item_date IS NULL
')
Then just access the view using normal SQL syntax.
SELECT * FROM vQADData