I resolved creating SQL query:
SELECT posts.post_title, posts.post_content, trans.element_type,
trans.language_code
FROM wp_posts AS posts
INNER JOIN wp_icl_translations AS trans
ON posts.ID = trans.element_id
INNER JOIN wp_postmeta AS meta
ON posts.ID = meta.post_id
WHERE trans.element_type="post_product"
AND trans.language_code="de"
This is added only if you need something on post_meta:
...
INNER JOIN wp_postmeta AS meta
ON posts.ID = meta.post_id
...
It was my solutions to get all post by language trans.language_code="de"
, trans.language_code="es"
, trans.language_code="en"
…
Related Posts:
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- Cannot add or update a child row: a foreign key constraint fails
- How to make MySQL table primary key auto increment with some prefix
- sql query with multiple where statements
- Cannot delete or update a parent row: a foreign key constraint fails
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- Syntax error due to using a reserved word as a table or column name in MySQL
- MySQL root password change
- Installation of MySQL for Visual Studio 1.2.8 failed
- How do I import an SQL file using the command line in MySQL?
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- Select from multiple tables without a join?
- SQL Query Where Field DOES NOT Contain $x
- Is there an SQLite equivalent to MySQL’s DESCRIBE [table]?
- SQL – Update multiple records in one query
- MySQL Error 1093 – Can’t specify target table for update in FROM clause
- Mysql command not found in OS X 10.7
- MySQL – UPDATE query based on SELECT Query
- grabbing first row in a mysql query only
- mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists
- Order a MySQL table by two columns
- MySQL AS keyword
- Should I use the datetime or timestamp data type in MySQL?
- Access denied; you need (at least one of) the SUPER privilege(s) for this operation
- How do I change the data type for a column in MySQL?
- Unknown Column In Where Clause
- Getting java.sql.SQLException: Operation not allowed after ResultSet closed
- Cannot connect to Database server (mysql workbench)
- mysqld: Can’t change dir to data. Server doesn’t start
- How to solve “Error: MySQL shutdown unexpectedly”?
- How to create a foreign key in phpmyadmin
- Can you do a For Each Row loop using MySQL?
- Drop all databases in MySQL
- CAST to DECIMAL in MySQL
- How to properly create composite primary keys – MYSQL
- Failed to Connect to MySQL at localhost:3306 with user root
- MySQL – count total number of rows in php
- How to get the count of each distinct value in a column?
- Data is not constantly loading from custom wordpress table
- How do you properly prepare a %LIKE% SQL statement?
- How to run WordPress across 2 VMs for high availability
- Mysqldump add drop table?
- How to disable `SQL_CALC_FOUND_ROWS` [duplicate]
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- #1115 – Unknown character set: ‘utf8mb4’
- WordPress Deadlock Error
- How to do a MySQL dump from production site without using a search and replace script for local development?
- How to bulk edit canonical url’s in SQL?
- Concurrent / simultaneous MySQL connections
- How to check for empty and not a failure
- Database: Custom table: sprintf value for DateTime column
- How many ‘wp_insert_post’ calls can be performed in one shot, in a very long ‘for’ loop?
- Keeping database within limits, please help!
- Best settings for MySQL to speed up site? [closed]
- WP_USE_EXT_MYSQL
- HTML Entities in Post Title
- Can’t find my wordpress DB in phpmyadmin
- Deprecated: mysql_connect():
- MySQL Rank & $wpdb
- When WordPress Default table, Echo Success. When Plugin Table, Echo Blank
- WordPress post_status is future, manually added
- How are multiple WordPress WPDB queries handled?
- Regarding “Insert query error” in wordpress
- MySQL 5.5 upgrade ‘broke’ WordPress [closed]
- WordPress plugin overloading with tmp tables
- Site not responding error – taking long to load [closed]
- WordPress(wpdb class) and mysql stored procedures
- WordPress plugins for database queries
- WordPress doesn’t display accents after migration
- Replace a character in all post titles and slugs
- Understanding custom php that reads from WP MYSQL
- $wpdb->get_var multiple queries in one database check
- List users with the most posts in the last 30 days
- Way to extract wordpress data from folder backup
- WordPress $wpdb no result
- Data is not constatntly loading from custom wordpress table
- Mysql Server keeps crashing
- edit_user_created_user hook – using to update Groups
- How to search usermeta table
- How to add virtual column in wpdb get_result statement
- PHP Warning: mysqli_error(): Couldn’t fetch mysqli in
- I want to share local developement and staging DB — Is this very smart or very stupid?
- Extract all users along with yoast metadata description
- WordPress asks to install, but is already installed?
- Mysql Error in querying form entries in Gravity Form plugin
- Deleting a table row through query
- An SQL query to find orphaned image attachments and their meta
- Weird characters displayed when importing WordPress MySQL db
- Simple SQL Query in wordpress
- Saving custom term value to the database in new table
- MySQL errors after a WordPress clone
- optimise SQL wordpress call
- Complicated MySQL Query
- WP_Query with LIKE returns strange query
- remove wordpress post links
- SQL get last entry of a specific gravity form
- mysqldump to a tar.gz
- Postgres equivalent to MySQL’s \G?
- How to check what port mysql is running on
- Where is my mysql log on OS X?