blob: aa4b27e39fb5cca66778eca35ca7aca8b015a652 (
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
|
.\" Automatically generated by Pandoc 2.5
.\"
.TH "mysql_insert_id" "3" "" "Version 3.3.1" "MariaDB Connector/C"
.hy
.SS Name
.PP
mysql_insert_id \- returns the auto generated ID used in last statement
.SS Synopsis
.IP
.nf
\f[C]
#include <mysql.h>
my_ulonglong mysql_insert_id(MYSQL * mysql);
\f[R]
.fi
.SS Description
.PP
Returns the auto generated ID generated by a SQL statement (usually
INSERT) on a table for a column defined with AUTO_INCREMENT attribute.
.SS Parameters:
.PP
\f[C]mysql\f[R] is 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].
.SH Return value
.PP
Returns the value of the modified column with AUTO_INCREMENT attribute.
If the table doesn\[cq]t contain an auto_increment column or no
INSERT/UPDATE statement was executed, this function will return zero.
.SS See also
.IP \[bu] 2
\f[B]mysql_query(3)\f[R]
|