I am having trouble using the wpdb object inside the <phpcode> tags of php exec. When I attempt to access wpdb with code that works when placed directly in a template, I get the following error when I put it in a post via phpexec:
"Call to a member function on a non-object"
Is there any way to fix this?
It seems the combination of phpexec and the wpdb object are very powerful. I would be grateful for any help from an experienced hand.