C API Function Descriptions
2161
String format:
Records: 100 Duplicates: 0 Warnings: 0
•
INSERT INTO ... VALUES (...),(...),(...)...
String format:
Records: 3 Duplicates: 0 Warnings: 0
•
LOAD DATA INFILE ...
String format:
Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
•
ALTER TABLE
String format:
Records: 3 Duplicates: 0 Warnings: 0
•
UPDATE
String format:
Rows matched: 40 Changed: 40 Warnings: 0
Note that
mysql_info()
returns a non-
NULL
value for
INSERT ... VALUES
only for the multiple-
row form of the statement (that is, only if multiple value lists are specified).
Return Values
A character string representing additional information about the most recently executed statement.
NULL
if no information is available for the statement.
Errors
None.
20.6.6.36.
mysql_init()
MYSQL *mysql_init(MYSQL *mysql)
Description
Allocates or initializes a
MYSQL
object suitable for
mysql_real_connect()
. If
mysql
is a
NULL
pointer, the function allocates, initializes, and returns a new object. Otherwise, the object is initialized
and the address of the object is returned. If
mysql_init()
allocates a new object, it is freed when
mysql_close()
is called to close the connection.
Return Values
An initialized
MYSQL*
handle.
NULL
if there was insufficient memory to allocate a new object.
Errors
In case of insufficient memory,
NULL
is returned.
20.6.6.37.
mysql_insert_id()
my_ulonglong mysql_insert_id(MYSQL *mysql)
Description
Returns the value generated for an
AUTO_INCREMENT
column by the previous
INSERT
or
UPDATE
statement. Use this function after you have performed an
INSERT
statement into a table that
contains an
AUTO_INCREMENT
field, or have used
INSERT
or
UPDATE
to set a column value with
LAST_INSERT_ID(expr)
[961]
.
More precisely,
mysql_insert_id()
is updated under these conditions:
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 ...