C API Function Descriptions
2157
MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *result)
Description
Returns the position of the field cursor used for the last
mysql_fetch_field()
. This value can be
used as an argument to
mysql_field_seek()
.
Return Values
The current offset of the field cursor.
Errors
None.
20.6.6.25.
mysql_free_result()
void mysql_free_result(MYSQL_RES *result)
Description
Frees the memory allocated for a result set by
mysql_store_result()
,
mysql_use_result()
,
mysql_list_dbs()
, and so forth. When you are done with a result set, you must free the memory it
uses by calling
mysql_free_result()
.
Do not attempt to access a result set after freeing it.
Return Values
None.
Errors
None.
20.6.6.26.
mysql_get_character_set_info()
void mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *cs)
Description
This function provides information about the default client character set. The default character set may
be changed with the
mysql_set_character_set()
function.
This function was added in MySQL 5.0.10.
Example
This example shows the fields that are available in the
MY_CHARSET_INFO
structure:
if (!mysql_set_character_set(&mysql, "utf8"))
{
MY_CHARSET_INFO cs;
mysql_get_character_set_info(&mysql, &cs);
printf("character set information:\n");
printf("character set+collation number: %d\n", cs.number);
printf("character set name: %s\n", cs.name);
printf("collation name: %s\n", cs.csname);
printf("comment: %s\n", cs.comment);
printf("directory: %s\n", cs.dir);
printf("multi byte character min. length: %d\n", cs.mbminlen);
printf("multi byte character max. length: %d\n", cs.mbmaxlen);
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...