Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Hello, is it possible to get last created ID after executing WorldDatabasePreparedStatement insert S

[DiscordArchive] Hello, is it possible to get last created ID after executing WorldDatabasePreparedStatement insert S

[DiscordArchive] Hello, is it possible to get last created ID after executing WorldDatabasePreparedStatement insert S

rektbyfaith
Administrator
0
02-23-2023, 04:53 PM
#1
Archived author: Vel • Posted: 2023-02-23T16:53:02.457000+00:00
Original source

Hello, is it possible to get last created ID after executing WorldDatabasePreparedStatement insert SQL?
rektbyfaith
02-23-2023, 04:53 PM #1

Archived author: Vel • Posted: 2023-02-23T16:53:02.457000+00:00
Original source

Hello, is it possible to get last created ID after executing WorldDatabasePreparedStatement insert SQL?

rektbyfaith
Administrator
0
02-23-2023, 05:01 PM
#2
Archived author: Tea • Posted: 2023-02-23T17:01:46.929000+00:00
Original source

maybe if you try using QueryHolder with 2 queries, first being the insert and second being `SELECT LAST_INSERT_ID()`
rektbyfaith
02-23-2023, 05:01 PM #2

Archived author: Tea • Posted: 2023-02-23T17:01:46.929000+00:00
Original source

maybe if you try using QueryHolder with 2 queries, first being the insert and second being `SELECT LAST_INSERT_ID()`

rektbyfaith
Administrator
0
02-23-2023, 05:03 PM
#3
Archived author: Tea • Posted: 2023-02-23T17:03:47.101000+00:00
Original source

the reason im suggesting QueryHolder is that its the only way to get a result while ensuring that both statements execute on the same connection
rektbyfaith
02-23-2023, 05:03 PM #3

Archived author: Tea • Posted: 2023-02-23T17:03:47.101000+00:00
Original source

the reason im suggesting QueryHolder is that its the only way to get a result while ensuring that both statements execute on the same connection

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)