PHP mysqli_fetch_lengths() Function
Return the field lengths in the result set:
$val)
{
printf("字段 %2d 长度为: %2d",$i+1,$val);
echo "
";
}
// Release the result set
mysqli_free_result($result);
}
mysqli_close($con);
?>
Definition and Usage
The mysqli_fetch_lengths() function returns the field lengths in the result set.
Syntax
mysqli_fetch_lengths(
result
)
;
| Parameters | Description |
|---|---|
| result | Required. Specifies the result set identifier returned by mysqli_query(), mysqli_store_result(), or mysqli_use_result(). |
Technical Details
| Return Value: | Returns an array of integers representing the length of each field (column), or FALSE if an error occurs. |
|---|---|
| PHP Version: | 5+ |
PHP MySQLi Reference Manual