I'm here asking you a little thing.
I have this code using WPDB class:
$result = $wpdb->get_results('select post_id, meta_value from ' . $wpdb->postmeta . ' as postmeta, '.$wpdb->posts.' as posts where postmeta.post_id = posts.ID AND posts.post_status = "publish" AND postmeta.meta_key = "expiration-date"');
and I'd like to have also the category ID of the post_id, and since wpdb->post2cat doesn't exists anymore from version 2.5, which JOIN should add to have it?
And is there maybe a function or something already in the WPDB class which would allow me to "move" the post from category to another? sort of like an update...
Thanks in advance to everyone!