Modify your query and use the SQL alias as
:
$my_row = $wpdb_c->get_results("SELECT Employee.Name as Employe_Name, Area.Name as
Area_Name, Area.Region as Area_Region FROM Area INNER JOIN Employee ON Area.ID =
Employee.Area_ID WHERE Employee.ID = " . get_the_ID());
Then in your code use:
$my_row[0]->Area_Name
Related Posts:
- Differences between wpdb->get_results() and wpdb->query()
- How to Use Wildcards in $wpdb Queries Using $wpdb->get_results & $wpdb->prepare?
- wpdb get posts by taxonomy SQL
- Multipart/formatted MySQL query problem
- Custom $wpdb Query for Custom Post Type by Category
- Can’t pass table to $wpdb->prepare
- $wpdb->get_var not returning a result
- Most effective use of DB querys
- $wpdb->query() vs. $wpdb->get_results() vs. phpMyAdmin
- wpdb::prepare() isn’t working
- $wpdb doesn’t appear to work on page inside of a plugin
- Strange string in console from wpdb query
- Using $wpdb->update but confused on the WHERE in and SET
- What’s wrong with my $wpdb prepare?
- Make one query for adding entries to database
- How to execute a SQL-query which contains multiple queries using $wpdb->query?
- Alter a specific query on WordPress
- wpdb->term_taxonomy count posts from both published and private posts?
- wpdb print all post meta
- Plugin will sort users by usermeta
- wpdb query problem to access previous 3 days posts
- How to write: $wpdb->update having WHERE NOT value pair in the array
- I can’t figure out what’s wrong with this statement. $wpdb->query update
- Use mysql_query instead of $wpdb query
- wpdb COALESCE won’t work
- Custom Query – Based on user input
- Custom SQL Query passing array to WHERE p.id
- Get posts from category with custom query
- Custom Query returns array, but I can’t see it’s elements
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- $wpdb->prepare affecting the query?
- prepare function sql safe method
- Updating with $qpdb->query() always returns 0 rows affected
- How to return count of custom post type posts with a specific custom field value via $wpdb?
- WordPress Mysql query and Duplicate
- How do I query for posts by custom meta and those that have been stickied?
- Help with Related Posts Function
- wpdb update multiple row?
- Formatting a date/time returned from a custom $wpdb query
- Improve performance of slow query
- How do I get specific readable results from this query and array results
- implementing my wp_query using $wpdb class
- Exclude Posts from a Widget
- Fastest and most efficient SQL query to check if UID exists
- Use $wpdb->get_results with filter based on array
- $wpdb query for price in custom field value
- Display result from custom post meta query
- Wpdb empty result only if language is Russian
- Run an update query in a function
- How to fix this insert? Don’t work for me!
- Problem on wpdb queries, wp_insert_post, wp_insert_user etc. The query runs twice
- Update vs Insert logic but the last key is always inserted?
- There is way to improve this query? wordpress get post data and some meta data
- $wpdb: how to use a query as a base for another query?
- Wpdb generates too many queries
- Custom Query for searching through custom fields
- Mysql query and odd results
- Retrieving custom field array value through db query
- How to get one result using wpdb class?
- Delete query won’t run
- update $wpdb one query
- get_results using wpdb
- Add multiple value to a query variable in WordPress
- wp_dropdown_categories with multiple select
- How to get my loop to pull posts into three columns
- Date query year and month OR just year
- Are database queries created using WordPress filters protected from SQL injection?
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- How to check current user in meta value array in WP_Query meta_query
- Change media attachment author via mysql query
- Optimizing Query used for a Shortcode
- $wpdb->replace: WHERE?
- Attempt to improve WP search, can someone check my SQL query?
- WordPress Query orderby title with UTF8 string in title
- Searching With Apostrophe
- get_posts showing only 5 posts. (nopaging and posts_per_page -1 not working)
- Custom WordPress Table wpdb
- Order by title – but now built in wordpress func, sort the_title
- Display posts between two particular dates
- Order posts by date, but also give priority for a specific term
- $post->ID not working in combination with a custom query
- Custom select query two tables by a meta key
- wpdb query with dynamic column name?
- How do you display the number of a post in a query?
- How can I get the name of term post meta value which equals term id
- Trying to use WP_Query to return post with and without meta values
- get products by custom date variable
- How to sort by two meta keys in admin area?
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- PHP Fatal error: Uncaught Error: Call to a member function insert() on null
- SQL query to delete users with multiple meta keys and comments
- Nested select statements not working
- Pagination adds search query (again)
- Counting And Monitoring How Much Queries My Script Used
- wpdb get_results() returns only 2 rows
- Function returning queried meta value based on current post ID
- search.php is not generating the right results
- Slow query when joining wp_posts with a lookup-table?
- Using wp_list_table how to trigger update function “inline”?