> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_info.md).

# mysql\_info

## Syntax

```c
const char * mysql_info(MYSQL * mysql);
```

## Parameter

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_init.md) or [mysql\_real\_connect()](/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect.md).

## Description

The `mysql_info()` function returns a string providing information about the last query executed.

## Return Value

Possible `mysql_info` return values. The nature of this string is provided below:

| Query type                                                                                                                                                | Example result string                        |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| [INSERT INTO...SELECT...](/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data.md)                                              | Records: 100 Duplicates: 0 Warnings: 0       |
| [INSERT INTO...VALUES (...),(...),(...)](/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data.md)                               | Records: 3 Duplicates: 0 Warnings: 0         |
| [LOAD DATA INFILE ...](/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data/load-data-into-tables-or-index/load-data-infile.md) | Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 |
| [ALTER TABLE ...](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md)                                                             | Records: 3 Duplicates: 0 Warnings: 0         |
| [UPDATE ...](/docs/server/reference/sql-statements/data-manipulation/changing-deleting-data/update.md)                                                    | Rows matched: 40 Changed: 40 Warnings: 0     |

{% hint style="info" %}
Queries which do not fall into one of the preceding formats are not supported (e.g. [SELECT ...](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select.md)). In these situations, `mysql_info()` will return `NULL`.
{% endhint %}

## See Also

* [mysql\_affected\_rows()](/docs/connectors/mariadb-connector-c/api-functions/mysql_affected_rows.md)
* [mysql\_warning\_count()](/docs/connectors/mariadb-connector-c/api-functions/mysql_warning_count.md)

{% @marketo/form formId="4316" %}
