Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] when im defining preparestatement if i use multiple ? do i have to provide multiple arguments or if

[DiscordArchive] when im defining preparestatement if i use multiple ? do i have to provide multiple arguments or if

[DiscordArchive] when im defining preparestatement if i use multiple ? do i have to provide multiple arguments or if

rektbyfaith
Administrator
0
11-02-2023, 01:17 PM
#1
Archived author: Rymercyble • Posted: 2023-11-02T13:17:46.978000+00:00
Original source

when im defining preparestatement if i use multiple ? do i have to provide multiple arguments or if i provide 1 it will be used for all placeholders ?
rektbyfaith
11-02-2023, 01:17 PM #1

Archived author: Rymercyble • Posted: 2023-11-02T13:17:46.978000+00:00
Original source

when im defining preparestatement if i use multiple ? do i have to provide multiple arguments or if i provide 1 it will be used for all placeholders ?

rektbyfaith
Administrator
0
11-02-2023, 01:27 PM
#2
Archived author: Roboto • Posted: 2023-11-02T13:27:34.339000+00:00
Original source

iirc you have to repeat the argument
rektbyfaith
11-02-2023, 01:27 PM #2

Archived author: Roboto • Posted: 2023-11-02T13:27:34.339000+00:00
Original source

iirc you have to repeat the argument

rektbyfaith
Administrator
0
11-02-2023, 01:28 PM
#3
Archived author: Rymercyble • Posted: 2023-11-02T13:28:15.971000+00:00
Original source

https://tenor.com/view/annoyed-disappoin...f-26051033
rektbyfaith
11-02-2023, 01:28 PM #3

Archived author: Rymercyble • Posted: 2023-11-02T13:28:15.971000+00:00
Original source

https://tenor.com/view/annoyed-disappoin...f-26051033

rektbyfaith
Administrator
0
11-02-2023, 01:28 PM
#4
Archived author: Rymercyble • Posted: 2023-11-02T13:28:43.516000+00:00
Original source

```cpp
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL_TALENTS);
stmt->SetData(0, spellId);
stmt->SetData(1, spellId);
stmt->SetData(2, spellId);
CharacterDatabase.Execute(stmt);
```
im enjoying my life choices
rektbyfaith
11-02-2023, 01:28 PM #4

Archived author: Rymercyble • Posted: 2023-11-02T13:28:43.516000+00:00
Original source

```cpp
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL_TALENTS);
stmt->SetData(0, spellId);
stmt->SetData(1, spellId);
stmt->SetData(2, spellId);
CharacterDatabase.Execute(stmt);
```
im enjoying my life choices

rektbyfaith
Administrator
0
11-02-2023, 02:46 PM
#5
Archived author: Natrist • Posted: 2023-11-02T14:46:22.705000+00:00
Original source

*Who* the **fuck** came up with that design
rektbyfaith
11-02-2023, 02:46 PM #5

Archived author: Natrist • Posted: 2023-11-02T14:46:22.705000+00:00
Original source

*Who* the **fuck** came up with that design

rektbyfaith
Administrator
0
11-02-2023, 03:01 PM
#6
Archived author: wakemeup • Posted: 2023-11-02T15:01:45.463000+00:00
Original source

Of course you have to fill every placeholder by hand Otherwise you'd open the gates of hell. Having to talk with the DB yourself is risky enough and if you put start putting some sort of magic into it, you will never be happy again, I promise you that
rektbyfaith
11-02-2023, 03:01 PM #6

Archived author: wakemeup • Posted: 2023-11-02T15:01:45.463000+00:00
Original source

Of course you have to fill every placeholder by hand Otherwise you'd open the gates of hell. Having to talk with the DB yourself is risky enough and if you put start putting some sort of magic into it, you will never be happy again, I promise you that

rektbyfaith
Administrator
0
11-02-2023, 03:12 PM
#7
Archived author: Rymercyble • Posted: 2023-11-02T15:12:19.342000+00:00
Original source

but there should be way to use same for multiple places otherwise i have to do this and its just pain
rektbyfaith
11-02-2023, 03:12 PM #7

Archived author: Rymercyble • Posted: 2023-11-02T15:12:19.342000+00:00
Original source

but there should be way to use same for multiple places otherwise i have to do this and its just pain

rektbyfaith
Administrator
0
11-02-2023, 03:32 PM
#8
Archived author: wakemeup • Posted: 2023-11-02T15:32:38.832000+00:00
Original source

What you could do is to write an abstraction that you can use between you layers. In ancient times people called it the Data Access Layer or DAL
rektbyfaith
11-02-2023, 03:32 PM #8

Archived author: wakemeup • Posted: 2023-11-02T15:32:38.832000+00:00
Original source

What you could do is to write an abstraction that you can use between you layers. In ancient times people called it the Data Access Layer or DAL

rektbyfaith
Administrator
0
11-02-2023, 03:34 PM
#9
Archived author: wakemeup • Posted: 2023-11-02T15:34:42.891000+00:00
Original source

Also I'm curious, when I look at the prepare statement you're using, I only see one placeholder
rektbyfaith
11-02-2023, 03:34 PM #9

Archived author: wakemeup • Posted: 2023-11-02T15:34:42.891000+00:00
Original source

Also I'm curious, when I look at the prepare statement you're using, I only see one placeholder

rektbyfaith
Administrator
0
11-02-2023, 03:35 PM
#10
Archived author: wakemeup • Posted: 2023-11-02T15:35:28.120000+00:00
Original source

PrepareStatement(CHAR_DEL_INVALID_SPELL_TALENTS, "DELETE FROM character_talent WHERE spell = ?", CONNECTION_ASYNC);
rektbyfaith
11-02-2023, 03:35 PM #10

Archived author: wakemeup • Posted: 2023-11-02T15:35:28.120000+00:00
Original source

PrepareStatement(CHAR_DEL_INVALID_SPELL_TALENTS, "DELETE FROM character_talent WHERE spell = ?", CONNECTION_ASYNC);

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