Actually i figured it out now using join
SELECT a.ID FROM wp_users a INNER JOIN wp_usermeta b ON b.user_id = a.ID AND
(
( b.meta_key = 'firstname-groom' AND b.meta_value LIKE 'Darren' )
OR ( b.meta_key = 'firstname-bride' AND b.meta_value LIKE 'Someone' )
OR ( b.meta_key = 'lastname-bride' AND b.meta_value LIKE 'Cool' )
)
INNER JOIN wp_usermeta c ON c.user_id = a.ID AND
( c.meta_key = 'weddingdate' AND c.meta_value="12/14/2014" )
GROUP BY a.ID
Related Posts:
- WordPress Paginate $wpdb->get_results
- Custom Search Query
- generate unique number when registering a user
- Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123
- Retrieve and display data from custom db table in admin area?
- How to find if a post with custom_field == X exists?
- Custom search page and search by title, content and tag
- Modifying loop on a custom page, strange behaviour
- Can I create front-end editable user profile pages with WordPress? How do I do it?
- Unique User Account Number + Displayed Via Shortcode
- How I display post of the post type group by year of post?
- Load more posts with multiple queries
- query usermeta from custom field
- Create membership number for existing/new users
- Hi, I wanted to make custom search with multiple fields
- $wpdb->replace: WHERE?
- wp_query get post custom taxonomy in search.php
- Order posts with a custom field but also without
- Save title as custom field on custom post type
- Add content in between of foreach
- Custom Loop Query For Search Page
- Custom SELECT Query With Multiple Meta Values (Ordering Problem)
- Undefined variable: user_id in get_user_meta
- Query for specific custom field
- Display posts by combining multiple meta key
- Custom select query two tables by a meta key
- Custom Same Page Search
- Fatal error Call to a member function insert() on a non-object [closed]
- Create Unique ID for user
- Recent activity query WordPress
- How to query term_id of a Custom Taxonomy by name
- WP Search Form Query: Add Author’s posts into search query
- query variables for custom taxonomies
- display text generated via custom get query string
- Gender based user avatar
- Custom query pagination with php parameter as arg problem
- How to automatically pull an information from a form field onto an other page?
- Query Posts to display all posts with category “custom field value”
- Query 1 custom post type, each day, alphabetically
- Multiple Taxonomies Using Custom SQL Query
- Search a meta field for a value in all posts
- Custom WordPress SQL Query 4 posts per custom taxonomy
- Custom MySQL query to list post
- Custom Query Arguments
- Custom Query for Taxonomy
- Include plugin´s table in custom query
- Problems with WP 6.1.1 and the get_user_meta() function
- User Query Multiple Orderby Clause
- Advanced Custom Fields in WP_Query: Href Returning Empty
- How to: Easily Move a WordPress Install from Development to Production?
- Is there a flowchart for WordPress loading sequence?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to remove admin menu pages inserted by plugins?
- How to put logs in WordPress
- How to get the Date Format and Time Format settings for use in my template?
- What SQL Query to do a simple find and replace
- Where are Additional CSS files stored
- Best Practices for Regression Testing WordPress Websites?
- Remove wrapping div and ul from output of wp_nav_menu
- What Is The Use Of map_meta_cap Filter?
- get post author id outside loop
- Custom Walker: how to get ID in function start_lvl
- Creative uses of WordPress [closed]
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to benchmark a WordPress installation? [closed]
- Should I delete the default themes?
- Moving WP install from local to live, what about wp_posts GUID?
- Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn’t work
- Running Gutenberg React in Development Mode
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- Is there a blank theme framework compatible with WP 3.0? [closed]
- Plugin SVN & update API – how are plugins identified?
- Users with custom roles not showing in post author select box
- How to use more than 256MB of memory in the admin?
- How do register_sidebar() and get_sidebar() work together?
- How do you get formatted content of a post using the WordPress API?
- Localization: I want the backend: english and frontend in defined language
- Are there any forks of WordPress (and what is different about them)?
- How to Change 404 page title
- Make Custom Metaboxes Collapse by Default
- Custom maintenance page
- Add button to TinyMCE bar without creating a plugin
- Why do I get the timeout warning?
- Automatically delete inactive users after 2 months
- How to add a new product type on woocommerce product types? [closed]
- How to include own css on wordpress tinymce editor?
- How to disable page delete
- add button to post edit page when post_status=publish
- how to override woocommerce specific loop or archive-product.php [closed]
- Modify existing plugin function using filter (without modifying the plugin directly)
- Rename UPLOADS folder with custom WP_CONTENT_DIR
- WordPress hook before inserting post into database