mysql_fetch_lengths — Returns the length of the columns of the current row

unsigned long * mysql_fetch_lengths(MYSQL_RES * result);

The mysql_fetch_lengths() function returns an array containing the lengths of every column of the current row within the result set.

Parameters

result

A result set identifier returned by mysql_store_result() or mysql_use_result().

Return value

An array of unsigned long integers representing the size of each column (not including terminating zero character) or NULL if an error occured.

[Note]

mysql_fetch_lengths() is valid only for the current row of the result set. It returns NULL if you call it before calling mysql_fetch_row() or after retrieving all rows in the result.

See also

mysql_fetch_row()