The following script will help you to identify if there any error exists in the query.
$wpdb -> show_errors ();
$call_post_id_call = $wpdb->get_results($wpdb->prepare($post_id_query));
$wpdb -> print_error ();
The following script will help you to identify if there any error exists in the query.
$wpdb -> show_errors ();
$call_post_id_call = $wpdb->get_results($wpdb->prepare($post_id_query));
$wpdb -> print_error ();