meta_compare
可能的值为
“!=”、“>”、“>=”、\'<;\',或=\'。默认值为“=”
如果要使用NOT LIKE
您需要创建meta\\u查询。
实例
\'meta_query\' => array( //(array) - Custom field parameters (available with Version 3.1).
array(
\'key\' => \'color\', //(string) - Custom field key.
\'value\' => \'blue\' //(string/array) - Custom field value (Note: Array support is limited to a compare value of \'IN\', \'NOT IN\', \'BETWEEN\', or \'NOT BETWEEN\')
\'type\' => \'CHAR\', //(string) - Custom field type. Possible values are \'NUMERIC\', \'BINARY\', \'CHAR\', \'DATE\', \'DATETIME\', \'DECIMAL\', \'SIGNED\', \'TIME\', \'UNSIGNED\'. Default value is \'CHAR\'.
\'compare\' => \'=\' //(string) - Operator to test. Possible values are \'=\', \'!=\', \'>\', \'>=\', \'<\', \'<=\', \'LIKE\', \'NOT LIKE\', \'IN\', \'NOT IN\', \'BETWEEN\', \'NOT BETWEEN\'. Default value is \'=\'.
),
array(
\'key\' => \'price\',
\'value\' => array( 1,200 ),
\'compare\' => \'NOT LIKE\'
))