I just discovered a solution (workaround) to a PhDBase problem that's been annoying me and I thought I'd share.
When I moved an app using PhDbase from 5.0 to 6.0 I stated getting API exception errors when I tried to process a PhDBase SQL select. It didn't always happen, but once it did start happening it generated an error every time until Foxpro was restarted (no clear all, close all, release all, etc. got rid of it).
Well, apparently the problem is the FROM in the SQL statment within the =PHD(). Take that out and it works fine. Apparently it isn't needed. Just make sure the table you're searching is the selected alias.