[wp-hackers] Wp_Query and wildcards
johnbillion+wp at gmail.com
Wed Aug 18 19:48:37 UTC 2010
Off the top of my head, you need to escape percent signs with another
percent sign: %%.
On Wed, Aug 18, 2010 at 5:21 PM, Lox <lox.dev at knc.nc> wrote:
> I alter a wp_query where using posts_where. I need to use the wildcard
> caracter, like so:
> $where .= " AND field LIKE '%" . esc_sql($query_vars['dip']) ."%'";
> But it seems wp_quey deletes the wildcard caracter... How can I solve that?
> lox.dev at knc.nc111
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers