mysql\_fetch\_lengths(3) MariaDB Connector/C mysql\_fetch\_lengths(3)

## [Name](#Name)

mysql\_fetch\_lengths - returns an array of length values for the current row

## [Synopsis](#Synopsis)

```
#include <mysql.h>
unsigned long * mysql_fetch_lengths(MYSQL_RES * result);
    
```

## [Description](#Description)

The mysql\_fetch\_lengths() function returns an array containing the lengths of every column of the current row within the result set (not including terminating zero character) or NULL if an error occurred.

## [Parameter](#Parameter)

•

result - a result set identifier returned by [**mysql\_store\_result(3)**](/man/enterprise-packages/mariadb-11.4/mysql_store_result.3) or [**mysql\_use\_result(3)**](/man/enterprise-packages/mariadb-11.4/mysql_use_result.3). ### Notes 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(3)**](/man/enterprise-packages/mariadb-11.4/mysql_fetch_row.3) or after retrieving all rows in the result.

## [Return value](#Return_value)

An array of unsigned long values . The size of the array can be determined by the number of fields in current result set.

## [See also](#See_also)

•

[**mysql\_field\_count(3)**](/man/enterprise-packages/mariadb-11.4/mysql_field_count.3)

•

[**mysql\_fetch\_row(3)**](/man/enterprise-packages/mariadb-11.4/mysql_fetch_row.3)

Version 3.4

---

Document: mysql_fetch_lengths(3) from mariadb-11.4 11.4.13-r5 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
