Support » Requests and Feedback » Combine wpdb query/prepare functions

  • Hi,

    Just a quick “feature request” I guess.

    We write custom plugins at work at the time and need various db queries run.. and it’s always the same pattern, prepare then run.

    Wouldn’t it make sense to combine the various wpdb query functions with the prepare method ?

    I mean once we’ve prepared the query, aren’t we just going to run it anyway? 🙂

    So we could have:
    $wpdb->get_prepared_results(“Query”,array(param1,param2))

    $wpdb->get_prepared_var(“query”,array(param1,param2));

    $wpdb->prepared_query(“query”,array(…));

    etc..

    food for thoughts..

    (and if these were the documented functions of wpdb that would probably teach plugin developers to always escape their queries)

    Cheers
    Ben

  • The topic ‘Combine wpdb query/prepare functions’ is closed to new replies.