[wp-hackers] Wp_Query and wildcards

John Blackbourn 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: %%.

John

On Wed, Aug 18, 2010 at 5:21 PM, Lox <lox.dev at knc.nc> wrote:
> Hello,
>
> 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
> lox.dev at knc.nc111
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list