Prepend the table prefix to iyzico_order_refunds
instead of the $wpdb
object:
$payment_transaction_id = $wpdb->get_var(
"SELECT payment_transaction_id FROM {$wpdb->prefix}iyzico_order_refunds} WHERE order_id=769 AND item_id=760"
);
Related Posts:
- what is the way to see the currently executing query in wordpress?
- WordPress 4.8.1 uses mysql_connect which doesn’t work with PHP 7
- How to use $wpdb to delete in a custom table
- Matching database content types to PHP types
- Does $wpdb->prepare not create a prepared statement that I can execute multiple times?
- $wpdb->last_error doesn’t show the query on error
- Saving custom form data into database
- Get data from database table by post_id to get data from second database table
- wp-content/db.php : where is this file?
- $wpdb sql help. Select post id and post meta value based on 2 other post_meta values
- $wpdb->get_results() returns good result only in first foreach iteration
- $wpdb->insert – inserting multiple rows
- $wpdb prepared with search term
- WPDB->insert with special characters
- wpdb-> not adding prefix to custom table
- Is there a (better) way to access $wpdb results?
- $wpdb->prepare not working with update table prefix
- How to use prepare to query with variables
- Use $wpdb in wordpress theme files
- wpdb->get_row() / get_results – is it possible to return an object instances of my own class?
- Problem in creating table through plugin code
- I want to update my postcontent with $wpdb
- $wpdb->replace / Replace or update primary key
- Create an array with a string key from wpdb->get_results
- $wpdb – do you have to use foreach even if there will always only be one result?
- Replicating the WP_Query ‘s’ param with $wpdb
- Need help writing a $wpdb query
- get the number of queries made on a page(inside my plugin)
- Doing a loop with multiple DBs simultaneoulsy
- $wpdb->insert query changes to SHOW COLUMNS query Output
- Fixing wpdb->get_results and wpdb->prepare?
- How does the WXR file differ from the WPDB?
- WordPress SQL query – returning ‘true’ ‘false’ or ‘null’
- Modify the structure of data returned by $wpdb
- WPDB If primary key already exists, add +1 to integer field
- How to get an array of user roles with or without a specific capability?
- What is wrong with this wpdb update?
- Programmatically Creating Page using $wpdb and getting 404 error
- Constructing a dynamic WPDB query with multiple LIKEs
- Problem in inserting row to custom database table
- sanitize_text_field and apostrophe problem
- 301 Redirect Code
- wpdb updating record in wordpress with json adds extra array elements
- Counting posts with argument without retrieving the posts
- How to display a specific category using a custom Query?
- $wpdb->insert inserting only f character in custom table
- PHP Fatal Error – $wpdb a non-object?
- Why does wpdb->update delete other meta?
- Increment integer field in database when WHERE needs to be dynamic [closed]
- How do I count columns on a custom WPDB query?
- Custom SQL query ORDER BY term_order
- Custom $wpdb returns unexpected time based results
- $wpdb->prepare was called incorrectly when inserting multiple records
- How to protect a script execution on WordPress?
- how to connect to another database in wordpress
- wpdb query not working
- Where can I see MySQL hostname and port for wp-config.php
- Save sql file after doing insert wpdb
- Perform a function when a user clicks register button
- $wpdb->get_results not returning an array
- Can I use wpdb to insert query results into a post?
- WPDB Query Question with Category Only
- $wpdb->prepare error after WordPress update [duplicate]
- wpdb result arrray inside an array
- $wpdb->num_rows doesn’t work
- $wpdb->get_var next var?
- How can I change my meta_query to SQL wpdb query?
- How do I modify this wpdb query to include posts that have a post_status of publish and draft?
- Can’t find out why dbDelta dosen’t create my table
- How to pass an input value into wpdb->Prepare
- How capturate wpdb exceptions?
- Check if Value Exists in Database, adding row details to variables and echoing result
- wpdb replace returning 1 where delete and insert is expected
- wpdb discards duplicate column names?
- update_post_meta not working in template_redirect action
- WPDB SQL query SELECT from category
- How to work with constraints on wordpress user metadata?
- How to Update multiple rows using $wpdb->update
- Unable to use $wpdb in WordPress
- How to display specific data from custom database table in WordPress
- Get 3 row ID’s via ARRAY_A
- Getting record from three wpdb tables
- Why is an empty result an error? ( $wpdb->get_row )
- get_row returns empty when data exists
- wpdb->update update the entire table instead of one row
- wpdb insert working in one function, but not another
- How to set up prepared query using IN statement
- WPDB Prepared Delete
- wpdb->update error
- wpdb select from using array as search parameters
- wpdb Cannot Access Associative Array Data in a Count Query
- Using $wpdb to update current post
- Can’t get expected result from a wpdb query
- Can’t seem to get set_blog_id working, it just doesn’t reset the blog ID
- DBDelta: “table doesn’t exist” for a table that was just created
- selecting row using wpdb which contain special symbols
- Query Problem in Clustom Plugin
- How does $wpdb->get_var work with offset?
- $wpdb The query does not contain the correct number of placeholders
- $wpdb:insert, more arguements in $format array than in $data