Support

Account

Home Forums General Issues How to search for meta array? Reply To: How to search for meta array?

  • You are searching for a number in the meta query. That means that the number must appear in either the title or the content

    $title = ‘this is a title’
    $content = ‘this is the content’
    $meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’

    then

    ($title LIKE ‘%1406%’ OR $content LIKE ‘%1406%’) AND $meta LIKE ‘%”1406″%’

    Is false

    The only way the above can be true is if something like either

    $title = ‘this is 1406 a title’
    $content = ‘this is the content’
    $meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’

    OR

    $title = ‘this is a title’
    $content = ‘this is the 1406 content’
    $meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’

    OR

    $title = ‘this is a 1406 title’
    $content = ‘this is the 1406 content’
    $meta = ‘a:3:{i:0;s:4:”1406″;i:1;s:4:”1407″;i:2;s:4:”1408″;}’