The reverse mechanism should work. I assume you are trying the get post metadata with the post row.
$resultat = mysqli_query($con,"SELECT * FROM wp_postmeta
LEFT JOIN wp_post
ON wp_postmeta.post_id = wp_post.ID
WHERE wp_post.post_type="shop_order"");
However, there will be a lots of duplication. If one post have 100 metadata, you are also getting the post row 100 times.
Related Posts:
- Use ajax to update_post_meta
- dbDelta support for FOREIGN KEY
- is it possible to run some php code within a wordpress page?
- How to correctly submit a search form and display the result in an independent page
- Get meta_id along with meta_key and meta_value
- How to use update and delete query in wordpress
- How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table
- How can merge two arrays values in one array and save in database
- Does WordPress cache get_user_meta() results?
- the_post_thumbnail() based on the Post ID
- How to use multiple query with same meta key
- Using Echo in ShortCode – Stuck
- MySQL query performed 4 times inside loop
- Show only one post for each author ( Page loads too slow )
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- Why is my get_post_meta always empty
- Compare two meta key values against each other inside the get_posts array?
- Modern Tribe Calendar wp-query with meta query not working at all
- WP database error for comments_popup_link()
- No wp-config.php file on local install of wordpress – site still displays
- Insert all post IDs in new database table
- Is the outdated PHP mysql extension a requirement for WordPress 4.6?
- What SQL / WordPress queries would need a nonce?
- Different database query in function.php using mysqli
- Change description on specific WooCommerce product status change
- Use WP_Query in shortcode
- Why is variable not working on custom sql query using wpdb?
- Get WooCommerce product details and transfer them to a custom DB table
- Random order of WP_Query results with highest meta value
- How can I export posts with featured images, without download them
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Create WP_Query to search for posts by their categories or their parent/child categories
- What is a valid parent for get_terms()?
- WSoD being caused by this piece of code
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Creating user status mode in WordPress
- Update results, Before deleting the related category [closed]
- Sum the total amount of a specific product purchased per user and display in table
- Replacing mysql_escape_string in a custom plugin when moving to PHP7
- Weird 404 URL Problem – domain name being placed at end of urls
- database sent to a JSON file
- $wpdb->insert() does not Insert record in a table
- WordPress SQL injection
- multiple where condition in result query
- Get post id within comments loop
- Grouping posts by a custom meta value
- Mixing variables into an array when inserting values
- wpdb prepare insert table doesn’t work
- Make a database query using WordPress
- How to use two meta_compare in an array?
- Remove empty terms from array, sort alphabetically, update back to repeating field
- I can’t update my data through $wpdb
- WordPress yoast seo plugin – parse snippet var in meta description
- Output: “Array”
- Using rules in Posts
- Using wordpress function to retrieve data
- Save the value of a wp_dropdown_pages
- Live search from database table
- form $_post action value gets truncated after it passes through two forms
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Add row to custom database Table and delete all rows older than 1 day
- How to create Loop code for Menu using WordPress?
- How to WP_Query posts order by parent title?
- get value from get_post_meta then reuse it in another get_post_meta
- Convert a column of a table containing an Array as response in HTML
- Please help! I have a problem with getting wordpress databas
- How to run complex query using PHP
- Error establishing a database connection (Set-up locally)
- Loop for recently (updated_post_meta) posts?
- Conditional formatting on data fetched from MYSQL
- Can I split a huge wp_postmeta table across different databases or servers?
- how to get data from two different table from wordpress database
- Passing Current User ID into SQL statement
- How to insert multiple rows and columns in database using array
- WordPress mysql deos not work with php7
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- Error inserting into custom table – Object of class wpdb could not be converted to string [closed]
- Windows Setup: Error establishing a database connection
- WP + MySql db / PHP
- The plugin generated 225 characters of unexpected output during activation
- WAMP SERVER Command Prompt SET PATH=%PATH%
- append data to mysql table via submit button coded in php – not working
- When working with a post, almost all wp_postmeta are deleted
- WordPress select query issue
- How to do a MySql query in WordPress?
- How can get all users by current user meta (array)?
- Add two or multiple functions in WordPress Post or Page
- Send data from plugin to external database
- Processing forms with php to wordpress database
- How to set max users to 17.000
- directorypress theme error mysql_error() [closed]
- How to connect database table to each registered wordpress user.
- get_post_meta is always empty when I use wp_mail
- Cannot Upload Custom Header Image into WordPress Dashboard
- MySQL update text field with ‘
- How to display the date under the post title?
- Predefine Magazine Style Layouts
- Parse error: syntax error, unexpected ‘}’ in C:\xampp\htdocs\admin\products.php on line 148 [closed]
- running an existing WordPress site from Visual Studio Code?