Fixing wpdb->get_results and wpdb->prepare?

As per suggestion by Milo, I removed the prepare statement, and it worked beautifully:

$rs = $wpdb->get_results( "SELECT id, title, alias FROM $rs_table_name ORDER BY id ASC LIMIT 999" );

I then came to try and overwrite it through a child theme. It was being added to a filter originally in the parent theme:

add_filter( 'rwmb_meta_boxes', 'gg_register_meta_boxes' );

I struggled as to how I could replace the filter; a simple remove and add of another function didn’t solve it, but I had to add the remove_filter to an action hook in order to overwrite the parent theme functions: after_setup_theme.

I solved that through the following code:

// Change Parent Theme Features
add_action( 'after_setup_theme', 'change_parent_theme_features', 10 );

function change_parent_theme_features() {
    remove_filter( 'rwmb_meta_boxes', 'gg_register_meta_boxes' );
}

Finally, I added the amended function to the above filter.