Added $wpdb->prepare to next/prev