How to query serialized array by comparing greater than (>=)?

enter image description here

I have serialized post meta values. It looks like this:

In array:

$kisiArray = array(
   'option1' => 7,
   'option2' => 'bar',
   'option3' => 'apple',
   'option4' => 'orange'
);

And I want to make a custom query with meta_query args. This is my query args:

<?php 
$args = array(
    'order'          => 'DESC',
    'meta_query'     => array(
        array(
            'key'     => 'themeOps_option1',
            'value'   => 6,
            'compare' => '>=',
        )
    )
);
?>

But it doesn’t display any result.

Read more here:: =)?” rel=nofollow>How to query serialized array by comparing greater than (>=)?

Leave a Reply

Your email address will not be published. Required fields are marked *