WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Where to user prepare with $wpdb (3 posts)

  1. somtam
    Member
    Posted 10 months ago #

    Hello everybody,

    I was wondering in which case do I have to use prepare with the $wpdb methods:

    - query
    - get_results
    - get_var
    - get_col
    - get_col
    - insert
    - replace
    - update
    - delete

    thanks!

  2. catacaustic
    Member
    Posted 10 months ago #

    You only need to use it if you're uisng one of the methods that takes an SQL string in, like query, get_results, get_val, etc.

    If you're using insert, update or delete then no, it's not needed becuase that's taken care of internally.

  3. somtam
    Member
    Posted 10 months ago #

    ok!
    it makes sense,
    thanks so much!

Reply

You must log in to post.

About this Topic

Tags