---
name: "mariadb_stmt_fetch_fields"
section: "3"
platform: "linux"
package: "mariadb"
version: "13.0.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mariadb_stmt_fetch_fields"
---

# mariadb\_stmt\_fetch\_fields(3)

### Name

mariadb\_stmt\_fetch\_fields - Returns an array of fields containing the column definitions ## Synopsis

-

  ```
  #include <mysql.h>
  MYSQL_FIELD *mariadb_stmt_fetch_fields(MYSQL_STMT * stmt);
  ```

### Description

Returns an array of fields. Each field contains the definition for a column of the result set. If the statement doesn’t have a result set a NULL pointer will be returned.

### Parameter

- •

  `stmt` - A statement handle, which was previously allocated by **[mysql\_stmt\_init(3)](/mysql_stmt_init/3.md)**.

### Notes

The number of fields can be obtained by **[mysql\_stmt\_field\_count(3)](/mysql_stmt_field_count/3.md)**

### History

This function was added in MariaDB Connector/C 3.1.0

### See Also

\***[mysql\_stmt\_field\_count(3)](/mysql_stmt_field_count/3.md)**
