• Hello

    I’ve got very strange problem using meta_query. It works fine until you select more than 9 checkboxes on the search.
    My code is like this for each field:
    if ($_POST[‘gym’] == ‘1’) {
    $metas[] = array(
    ‘key’ => ‘qit_gym’,
    ‘value’ => serialize(strval($_POST[‘gym’])),
    ‘compare’ => ‘LIKE’
    );
    }

    Where $metas[] is my array for all checkboxes. Then create the query with the other variables:
    $totalquery = array(
    ‘types’ => $s_type,
    ‘locations’ => $s_location,
    ‘post_type’ => ‘estates’,
    ‘posts_per_page’ => $per_page,
    ‘meta_query’ => $metas
    );
    $search_query = new WP_Query($totalquery);

    Tested on WP 3.2 and 3.3 -> not working.

    Does anybody knows if there is particular limitation or it is a bug?

Viewing 1 replies (of 1 total)
  • I’ve come up against the same problem using WP_User_Query; up to 9 meta queries returns in less than two seconds; 10 queries and the process just runs and runs (I’ve let it go as long as ten minutes). On my localhost it crashes the server, and maxes out CPU. On the live server it just keeps running until I kill it.

Viewing 1 replies (of 1 total)
  • The topic ‘meta_query with more than 9 arrays?’ is closed to new replies.