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
- Undefined function mysql_connect()
- MySQL column count doesn’t match value count at row 1 [closed]
- Undefined function mysql_connect()
- Fatal error: Call to undefined function mysql_connect()
- Fatal error: Call to undefined function mysql_connect()
- Deprecated: mysql_connect()
- MySQL “Or” Condition
- How to update custom fields using the wp_insert_post() function?
- the_date() not working
- How to return number of found rows from SELECT query
- dbDelta support for FOREIGN KEY
- Transaction when using WP functions rather than vanilla SQL?
- Can i use php sql functions instead of $wpdb?
- 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
- Query both first_name and last_name from wp_usermeta at the same time
- Check if post of title already exists
- $wpdb->delete column values IN ARRAY()?
- How to validate WordPress generated password in DB using PHP?
- How to get the list of WooCommerce product image of a certain category from database?
- 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
- Check if user already visited this post today
- Custom query to get post names beginning with a digit
- How to make WordPress plugin check for database changes and then do something?
- Custom SQL query to get List of posts with featured image url
- Display all meta for a post?
- How To Make Connection To WordPress Data Base In A Plugin?
- How to add query vars with paginated URLs?
- Changing user_nicename
- Does WordPress cache get_user_meta() results?
- How to display multiple Post meta_key/meta_values by SQL query
- the_post_thumbnail() based on the Post ID
- How to use multiple query with same meta key
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- How to update single value in multi dimensional Post Meta?
- tag search using WP_Query
- simple wordpress ajax plugin not working when not logged in
- Delete post revisions on post publish
- Jquery ajax to custom php file: returning blank data
- Add value to usermeta without removing previous values?
- Using Echo in ShortCode – Stuck
- Problems migrating WordPress to localhost
- MySQL query performed 4 times inside loop
- Show only one post for each author ( Page loads too slow )
- error importing localhost export file to server
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to sort results from a custom database table
- Install will not load: PHP does not have MYSQL installed
- Why is my get_post_meta always empty
- Update some database fields when post is saved
- How can I call a row of user specific data from a custom table added to the WP Database
- Compare two meta key values against each other inside the get_posts array?
- Insert post without actions/hooks
- How can update custom meta for all posts
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- How to merge local and live databases?
- How to track a users progress through pages by inserting data into WordPress Database?
- the_author_meta not working
- Import 10,000 Users into WordPress WITH a specific ID for each user
- Modern Tribe Calendar wp-query with meta query not working at all
- WP database error for comments_popup_link()
- if statement on database query
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- Successful or Error Message after running mysql code in functions.php
- sql query to put quotes around numbers in img tag
- No wp-config.php file on local install of wordpress – site still displays
- How to get the post_id from postmeta
- Sortable admin column for one meta key with three possible meta values
- WordPress Ajax Custom Query – High CPU LOAD
- AJAX in WordPress, sending coords data to MySQL and show after into map
- Performance issues with large website [closed]
- Create a quick start wordpress installation [closed]
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- theme options echoing multiple times
- PHP/MySQL issues when running WP on EC2 cloud [closed]
- Insert all post IDs in new database table
- WordPress 3 – how are passwords stored and how do I compare to them?
- Styling images coming from another blog
- WordPress get pagination on wpdb get_results
- register_activation_hook isn’t adding table to DB
- mysqli_real_connect() – authentication method unknown to the client Warnings
- Is the outdated PHP mysql extension a requirement for WordPress 4.6?
- How to create another version of my site based on the same database
- What SQL / WordPress queries would need a nonce?
- Different database query in function.php using mysqli
- how to echo all tables that start with a prefix
- how to increase custom post value by one most efficiently?
- Batch update a post meta field value of each post in Post Type
- Do I need to prepare query before get_results(), get_row() and get_var()?
- Strange wordpress slowness
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- How to Display Image Meta underneath EVERY image in EVERY post
- Looking for most performant way to execute several similar WP queries within shortcodes
- Query String being Removed Creating a Pagination Issue within a Custom Plugin