3
votes
2answers
173 views

Search multiple meta keys at once

How would I modify the following SQL Query to allow me to search multiple meta keys at once? e.g. user_business AND user_about In the end I'll be searching about 40 - 50 different meta keys; or if ...
0
votes
1answer
57 views

WordPress Mysql query and Duplicate

i've a problem with mysql query on my wordpress database. I've custom fields Country and City. At moment I have this query that show all the cities of "UK" Country $querystr = " SELECT wposts.* ...
1
vote
1answer
139 views

Mysql query and order meta value

I made a mysql query to WordPress like this: $querystr = " SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND ...
0
votes
1answer
36 views

Filtering problem

I got the custom_post_type_data in which I store some variables when I make a new post. Variables likes Author, Price etc. I implemented a filtering by author, so when you click on James (for ...
5
votes
3answers
1k views

Complex meta query with 3 keys

I think the problem essentially relates to sql query structure and I am not an expert.... I need to search for posts (custom post type) by 2 parameters: pd_city pd_country Please note that ...
0
votes
1answer
584 views

Difference between 'LIKE' and 'IN' in meta queries

You can use a variety of different comparison operators in meta queries, among which are 'LIKE', 'NOT LIKE', 'IN', and 'NOT IN'. What is the difference in use between LIKE and IN? Here's the ...
0
votes
2answers
288 views

WordPress & MySQL , problem with use many array in meta_query

I use this code for display custom posts : $args = array( 'category__in' => $bookcat, 'meta_query' => array( 'relation' => 'OR', array('key' => ...