I am trying to query the Gravity Form entries in our database. However, every query I write in PHPMyAdmin doesnt work when moved to Wordpress. For example:
$output = $wpdb->get_results("SELECT COUNT(meta_value) FROM `ps_gf_entry_meta` WHERE form_id = 39 AND meta_key = 17"); <div class="echotest"> <?php echo($output); ?> </div>
This does output something, however, it's "1" when the correct count should be "3"