WordPress.org

Ready to get started?Download WordPress

Forums

Combine wpdb query/prepare functions (1 post)

  1. doginthehat
    Member
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by ggggggggggfhfh
  • This topic is not a support question
  • WordPress version: 3.1

Tags

No tags yet.