I have the following query running via DSN via odbc_connect in PHP:
SELECT Orders.Brand, Orders.AdFolder FROM Orders LEFT JOIN MPC_Agents ON Orders.UserName = MPC_Agents.UserName WHERE Orders.AdFolder = '$udf'
When launched directly in MS Access, the result is instant. When it went through odbc_execute($conn, $query) , it is incredibly slow, but it does after a while.
When the WHERE pulled out, it is much faster, even though when run in the Access SQL console, the speed is the same as in the WHERE .
Can someone help identify the problem?
source share