1 | 500c500 |
---|
2 | < 'REGEXP', 'NOT REGEXP', 'RLIKE' |
---|
3 | --- |
---|
4 | > 'REGEXP', 'NOT REGEXP', 'RLIKE', 'FIND_IN_SET' |
---|
5 | 609a610,613 |
---|
6 | > case 'FIND_IN_SET': |
---|
7 | > $where = $wpdb->prepare( "FIND_IN_SET( %s, $alias.meta_value )", $meta_value ); |
---|
8 | > break; |
---|
9 | > |
---|
10 | 615c619 |
---|
11 | < |
---|
12 | --- |
---|
13 | > |
---|
14 | 617,620c621,628 |
---|
15 | < if ( 'CHAR' === $meta_type ) { |
---|
16 | < $sql_chunks['where'][] = "$alias.meta_value {$meta_compare} {$where}"; |
---|
17 | < } else { |
---|
18 | < $sql_chunks['where'][] = "CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$where}"; |
---|
19 | --- |
---|
20 | > if( 'FIND_IN_SET' == $meta_compare ) |
---|
21 | > $sql_chunks['where'][] = $where; |
---|
22 | > else { |
---|
23 | > if ( 'CHAR' === $meta_type ) { |
---|
24 | > $sql_chunks['where'][] = "$alias.meta_value {$meta_compare} {$where}"; |
---|
25 | > } else { |
---|
26 | > $sql_chunks['where'][] = "CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$where}"; |
---|
27 | > } |
---|