Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

SQL.MySQL.InsertID

For MySQL Connection queries the last insert ID.

Component Version macOS Windows Linux Server iOS SDK
SQL 2.9 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "SQL.MySQL.InsertID"; Connection )   More

Parameters

Parameter Description Example
Connection The connection reference number gained with SQL.NewConnection. $Connection

Result

Returns the ID or error message.

Description

For MySQL Connection queries the last insert ID.
Please query value right after doing Insert. This value is reset when you call commit.

see also
http://dev.mysql.com/doc/refman/5.1/en/mysql-insert-id.html

See also

Blog Entries

Created 18th August 2014, last changed 19th January 2021


SQL.ListConnections - SQL.NewCommand

Feedback: Report problem or ask question.