I have the following query:
$name = $wpdb->get_results("SELECT appname FROM `$table_db_name` WHERE ID = '$ID' ", OBJECT);
Every of these values are correct and when I query it to the database it returns me an array with 1 option.
When I echo $name
its result is: ‘Array’, while in the database it says: ‘Succesful’
It should mention ‘Succesful test’ as echo and not ‘Array’
Try this:
Edit:
Since i didn’t notice that you were using WordPress, one thing you can do.
You can also use
$wpdb->get_var()
instead of$wpdb->get_row()
to fetch only the appname and not have to worry about using arrays.more information found here:
https://wordpress.stackexchange.com/questions/14239/wpdb-get-row-only-returns-a-single-row