Support » Everything else WordPress » Where to user prepare with $wpdb

  • Resolved somtam


    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


Viewing 2 replies - 1 through 2 (of 2 total)
  • catacaustic


    very awesome

    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.



    it makes sense,
    thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where to user prepare with $wpdb’ is closed to new replies.