its a syntax error according to error message. starements like below might work for you.
global $wpdb;
$wpdb->show_errors();
$tableCustom = 'join_users_defis';
$sql = "SELECT * FROM {$wpdb->postmeta}";
$requeteAffichage = $wpdb->get_row( $sql );
//or $requeteAffichage = $wpdb->get_results( $sql );
var_dump($requeteAffichage);
Related Posts:
- Why $wpdb->show_errors() and print_error() is showing an output even if the query output is correct?
- How to use $wpdb to delete in a custom table
- get_results on large datasets
- $wpdb->last_error doesn’t show the query on error
- Is there a (better) way to access $wpdb results?
- How do you use prepare when asking for a list of id’s
- how to execute different sql query in non-sanitized $wpdb->get_results function
- WPDB update row with != in where clause
- How to update records using $wpdb?
- Need help writing a $wpdb query
- show badge with count for pending items in custom post type
- WP Sql query multiple where clause
- WordPress SQL query – returning ‘true’ ‘false’ or ‘null’
- Modify the structure of data returned by $wpdb
- Syntax for $wpdb->prepare when searching in two columns
- Confused by $wpdb->prepare
- How to display user_nicename and usermeta values by custom query in WordPress?
- Optimizing WordPress Queries – Removing Group By ID
- How can I combine one field using wpdb and group by?
- $wpdb->prepare with ON DUPLICATE KEY UPDATE
- how to use $wpdb->prepare to update a custom table
- WPDB Placeholders and second argument for prepared statements
- Increment integer field in database when WHERE needs to be dynamic [closed]
- Custom SQL query ORDER BY term_order
- Custom $wpdb returns unexpected time based results
- How to left join meta in queries [closed]
- wpdb->get_row is selecting the variable as a column name
- CREATE TABLE with dbDelta does not create table
- $wpdb query outputs php code instead of executing it
- wpdb query not working
- WordPress wpdb->insert returns int(0) => doesn’t insert anything, no errors!
- WPDB SQL Ignore `post_status` Parameter
- how to list all post that are in the custom taxonomy using $wpdb
- “This message was added in version X” showing a later version than current one
- WPDB SQL query SELECT from category
- Show error messages to a user when database insert fails
- How to use WHERE NOT EXISTS query to avoid duplicate entry using $wpdb to save in custom table?
- Creating an Angular factory from custom database table
- wpdb->update update the entire table instead of one row
- How do I update post based on meta_key in another table?
- How to set up prepared query using IN statement
- Custom database query to validate data
- Alter the main search query to search posts by coauthor user name
- Creates only one table and not the other
- Protect custom form from SQL injection
- looking for a way to allow users to backup the plugin db data(save as)
- SQL Query to select post title & post ID from a particular category
- Get comments after specific date
- query using wpdb in wordpress gets me no result
- Get count of rows based if column exists in two different tables
- query_vars doesn’t return query string (trying to get data from $wpdb)
- $wpdb->get_row() only returns a single row?
- what is the way to see the currently executing query in wordpress?
- Get error messages when $wpdb->insert() returns false?
- Multipart/formatted MySQL query problem
- How to make an activities stream mixing posts and comments?
- Delete/replace img tags in post content for auto published posts [closed]
- What does wp_update_post() do that the $wpdb class does not?
- $wpdb variable throw this error Call to a member function get_results() on a non-object in
- WordPress insert NOW() in TIMESTAMP column returns all zeros
- $wpdb prepare issue with mysql DATE_FORMAT
- How-To: wpdb Insert Record With Date
- How to pass NULL in where array for $wpdb->update
- Get WooCommerce product attribute taxonomies in a SQL query on WordPress database
- Get random row from custom table
- store custom WP table names in a global variable
- I am not understandinhg $wpdb->prepare correctly
- Using WPDB class
- What is _transient_random_seed for?
- wpdb get_results() and prepare when to use prepare?
- Foreach loop using $wpdb not results from rows
- What’s the proper way to add users to my site in order to test things?
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- Code only works every other time its run
- I can’t figure out what’s wrong with this statement. $wpdb->query update
- Can’t pass variable in wordpress wpdb->get_results
- Problem in using wpdb
- How do I count columns on a custom WPDB query?
- Trouble inserting string containing quotations marks with wpdb in save_post hook
- How can I add a new row in a separate database when someone registers via WordPress?
- Clear Terms from Taxonomy for Specific Post IDs?
- $wpdb->insert() doesnt work anymore
- $wpdb->get_results not returning an array
- WPDB Query Question with Category Only
- wpdb result arrray inside an array
- Fetching review value using wpdb class
- $wpdb->num_rows doesn’t work
- How capturate wpdb exceptions?
- Limit left join
- Get records from Formidable Table using $wpdb->get_col
- What argument does my function need to echo get_results() query results
- Missing argument 2 for wpdb::prepare() [duplicate]
- Save customizer default values to DB on theme activation
- Plugin with connection to database – Single function
- wpdb->update error
- Wpdb generates too many queries
- Using $wpdb to update current post
- DBDelta: “table doesn’t exist” for a table that was just created
- Table wont load into WPDB
- WPDB prepare – like % – placeholders?