blob: 2b9cea23a2b6ec5108e7b4b23af2e236180ba6b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
.\"t
.\" Automatically generated by Pandoc 2.5
.\"
.TH "mysql_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
.hy
.SS Name
.PP
mysql_info \- provides information about the last executed statement
.SS Synopsis
.IP
.nf
\f[C]
#include <mysql.h>
const char * mysql_info(MYSQL * mysql);
\f[R]
.fi
.SS Description
.PP
The \f[C]mysql_info()\f[R] function returns a string providing
information about the last statement executed.
.SS Parameter
.IP \[bu] 2
\f[C]mysql\f[R] \- a connection identifier, which was previously
allocated by \f[B]mysql_init(3)\f[R] and connected by
\f[B]mysql_real_connect(3)\f[R].
.SS Notes
.PP
Statements which do not fall into one of the preceding formats are not
supported (e.g.\ \f[C]SELECT\f[R]).
In these situations mysql_info() will return an empty string.
.SS Return value
.PP
Zero terminated information string.
The information depends on statement type:
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Query type
T}@T{
Example result string
T}
_
T{
\f[C]INSERT INTO...SELECT...\f[R]
T}@T{
Records: 100 Duplicates: 0 Warnings: 0
T}
T{
\f[C]INSERT INTO...VALUES (...),(...),(...)\f[R]
T}@T{
Records: 3 Duplicates: 0 Warnings: 0
T}
T{
\f[C]LOAD DATA INFILE\f[R]
T}@T{
Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
T}
T{
\f[C]ALTER TABLE ...\f[R]
T}@T{
Records: 3 Duplicates: 0 Warnings: 0
T}
T{
\f[C]UPDATE ...\f[R]
T}@T{
Rows matched: 40 Changed: 40 Warnings: 0
T}
.TE
.SS See also
.IP \[bu] 2
\f[B]mysql_affected_rows(3)\f[R]
.IP \[bu] 2
\f[B]mysql_warning_count(3)\f[R]
|