Object of class mysqli_result could not be converted to string return mysql average

前端 未结 3 634
难免孤独
难免孤独 2020-12-21 12:35

Can someone explain how I would output the result of the sql below? currently getting \'Object of class mysqli_result could not be converted to string\'.

$sq         


        
3条回答
  •  Happy的楠姐
    2020-12-21 13:07

    Error because you are echoing an object, so try like this,

    while($res = mysqli_fetch_array( $result )) {
        echo $res['AverageSatisfactionScore'];
    } 
    

提交回复
热议问题