Call to a member function get_var() on a non-object
Any thoughts on why I'm getting this error? I've set up the required $wpdb global.
Here's the line that's generating the error:
PHP Code:
$existing_job = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM " . $wpdb->prefix ."postmeta WHERE meta_key = 'external_job_ad_id' AND meta_value = %d", $external_job_ad_id));
I'm calling it from a script in /themes/jobroller/includes.
Someone had suggested on another forum it might be wordpress is not finding the file needed to instantiate $wpdb;
I'm using the most current versions of both JR and Wordpress.