$result 數量or 長度

$n = mysqli_num_rows($result); // 獲取數據條目數 ->15
$d = mysqli_num_fields($result); // 獲取字段個數 -> 4

真相是↓(注意:顏色對應着看)mysql

print_r($result);
// -> mysqli_result Object
( [current_field] => 0 [field_count] => 4 [lengths] => [num_rows] => 15 [type] => 0 )
相關文章
相關標籤/搜索