I have a custom table in my wordpress install, and I want to get an average out of a column on the table. I'm using the following PHP:
$latavg = $wpdb->get_results("SELECT AVG(stop_lat) FROM stops_txt");
However, when I want to use the average later on as a string, it returns as 'ARRAY', yet attempting to use PRINT_R to view the array reveals nothing. The Column in the table is a DECIMAL data-type, what am I missing?