Change your query to:
SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON wp_postmeta.post_ID = wp_posts.ID WHERE ( wp_postmeta.meta_key = 'Color' AND wp_postmeta.meta_value IS NOT NULL );
That way it only gets the data in wp_posts, but still filters based on your criteria.
Related Posts:
- Unknown collation when I import a dump from an existing site into a development database?
- Exporting completed webiste for another server
- How do I import an SQL file using the command line in MySQL?
- Setting up foreign keys in phpMyAdmin?
- #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
- MySQL Error #1133 – Can’t find any matching row in the user table
- phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client
- How to create a foreign key in phpmyadmin
- importing a CSV into phpmyadmin
- MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- What specific database privileges does WordPress need?
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- How to copy post titles to post slug in phpmyadmin
- Export only pages and posts with mysql dump
- How to do a MySQL dump from production site without using a search and replace script for local development?
- MySQL Syntax Error upon restoring database from backup [closed]
- How to Create a Admin User for A WordPress Site via MySQL (PHPMyAdmin)?
- SQL error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’ [closed]
- Error while importing database
- Set meta_key and meta_value for all registered user in wordpress using sql query [closed]
- Can’t find my wordpress DB in phpmyadmin
- WordPress database import: Row size too large
- Backing up and restoring multiple sites efficiently
- $wpdb to insert html form information
- Create a form with custom autocomplete address field and CSV import values
- Setting up WordPress Locally on WAMP for a new site (with one already)
- Getting Error Trying to Create Table
- Export Yoast Keywords from MySQL/phpMyAdmin
- Editing mysql tables/database with wordpress or other app/cms
- Migration problems with mysql: Operation not allowed when innodb_forced_recovery > 0 [closed]
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- List users with the most posts in the last 30 days
- latency problems with wordpress install (from SQL import)
- Mysql Server keeps crashing
- How to bulk delete a certain part of all wordpress posts
- When I add metadata, metavalue length is added in to the value in some cases
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- Find locations of all featured images of draft posts via SQL
- SQL query to change custom field in WordPress database
- An SQL query to find orphaned image attachments and their meta
- Weird characters displayed when importing WordPress MySQL db
- Export posts with postmeta without ID?
- cannot log in to the mysql server (wamp and wordpress)
- SQL command to export post_content from wp_posts using phpMyAdmin
- Need SQL query to find&replace image URL
- How do I load a sql.gz file to my database? (importing)
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- MySQL ERROR 1290 (HY000) –secure-file-priv option
- mysql Foreign key constraint is incorrectly formed error
- mysql: SOURCE error 2?
- How to avoid MySQL ‘Deadlock found when trying to get lock; try restarting transaction’
- MySQL IF NOT NULL, then display 1, else display 0
- Repair all tables in one go
- Failed building wheel for mysql-python
- ERROR 1115 (42000): Unknown character set: ‘utf8mb4’
- Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it cannot execute this statement
- Remove Primary Key in MySQL
- mysql: connection refused when trying to connect to localhost using remote IP
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Why are simple updates to wp_postmeta’s “_edit_lock” so slow?
- Complex meta query with 3 keys
- Gaining Login Access via the Database
- query to create woocommerce products from images
- Configure WordPress to connect to Mysql DB using SSH tunneling
- wordpress custom theme import and export options for sample data [closed]
- Is it possible to recover featured images after WordPress export/import
- Imported thumbnails have incorrect URL
- Moving test theme to live site without mySQL error – how? [closed]
- How to split the a table in database?
- How do I join a $wpdb query with user meta using default value if not exist?
- mySQL statment count of post in each category and sub category
- WordPress Local And Live Site
- Paypal Post IPN handeling nightmare
- Moving WordPress site to an existing WordPress site
- WordPress tables and aliases?
- What’s the sql for this condition?
- WordPress insert query is not working : Showing no Error
- Copy usermeta value where ID matches in the same table
- Some Post Content Does Not Show Up In DB Search
- Plugin generating unexpected output – on WP mysql dump import
- Exporting by table
- Upgrade DB Loop – WordPress DB Version Conflict
- Two-way synchronizing of a post type among multisite blogs
- Transferring theme and imported post attachments
- Button writing to MYSQL database
- MySQL ‘duplicate entry’ error
- How to show result of sql query in a page?
- Why can’t i come back to older working version of php after ugrade with error log on php 7.2 and 7.3
- How to import several big Import XMLs?
- Query does not filter duplicate _sku numbers
- MySQL Select within WP Page template
- wp_postmeta – lot of meta fields
- Delete posts with word count less than x number of words
- MySQL: get post_tag items that are tags (not SEO keywords)
- $wpdb->get_var returns 0
- Initialization of table in database using ‘CREATE … IF NOT EXISTS’
- mysqldump throws: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109)
- Batch Replace URLs in WordPress Database