Hi im trying to echo single data from a custom table inside my wordpress database.
I found <a href="https://wordpress.stackexchange.com...-data-from-custom-table-in-wordpress-database">the code to print multiple columns</a>. However I just want to print a single field, so my code looks like this:
Unfortunately it just prints the word 'Array'
I found <a href="https://wordpress.stackexchange.com...-data-from-custom-table-in-wordpress-database">the code to print multiple columns</a>. However I just want to print a single field, so my code looks like this:
Code:
global $wpdb;
echo $wpdb->get_results( "SELECT * FROM table.column WHERE id = 1" );
Unfortunately it just prints the word 'Array'