Hook into $wpdb

query – you will get sql as argument of the callback.

add_filter('query', 'some_callback_that_change_query');

function some_callback_that_change_query($sql){
    remove_filter('query', 'some_callback_that_change_query');
    // your banny wrote
    add_filter('query', 'some_callback_that_change_query');
    return $sql;
}

Leave a Comment

tech