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
- After Import: Insert “Use” Statement in Database
- 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’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- How to use mysqli_query() in PHP?
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- Column count doesn’t match value count at row 1
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- MySQL string replace
- Cannot add or update a child row: a foreign key constraint fails
- ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- String concatenation in MySQL
- What’s the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN? [duplicate]
- Cannot add or update a child row: a foreign key constraint fails
- MySQL Error “Operand should contain 1 column”
- How to use MySQL DECIMAL?
- Access denied for user ‘root@localhost’ (using password:NO)
- Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ (38)
- How to make MySQL table primary key auto increment with some prefix
- Access denied for user ‘root@localhost’ (using password:NO)
- MySQL ERROR 1290 (HY000) –secure-file-priv option
- MySQL error 2006: mysql server has gone away
- Which MySQL data type to use for storing boolean values
- sql query with multiple where statements
- ERROR 2003 (HY000): Can’t connect to MySQL server on localhost (10061)
- ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 2003 (HY000): Can’t connect to MySQL server on localhost (10061)
- MySQL server startup error ‘The server quit without updating PID file’
- Rename a column in MySQL
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- Cannot delete or update a parent row: a foreign key constraint fails
- Export Pervasive to MySQL (C#)
- MySQL server startup error ‘The server quit without updating PID file’
- How do I restore a dump file from mysqldump?
- Syntax error due to using a reserved word as a table or column name in MySQL
- ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
- MySQL root password change
- Installation of MySQL for Visual Studio 1.2.8 failed
- Not unique table/alias
- PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused
- #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
- MySQL ERROR 1045 (28000): Access denied for user ‘bill’@’localhost’ (using password: YES)
- Your password does not satisfy the current policy requirements
- How do I quickly rename a MySQL database (change schema name)?
- What does SQL Select symbol || mean?
- How do I import an SQL file using the command line in MySQL?
- Install mysql-python (Windows)
- MySQL: Access denied for user ‘test’@’localhost’ (using password: YES) except root user
- PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused