Finding the next SQL Auto increase? |
Finding the next SQL Auto increase? |
21.03.2019, 08:38:29
Post
#1
|
|
Grupa: Zarejestrowani Postów: 2 Pomógł: 0 Dołączył: 21.03.2019 Ostrzeżenie: (10%) |
Hey there,
I am working on an achievement system for my website and I need to add an INSERT INTO function for the achievement table to the registration system. My achievement system works based on user ID that matches the users table. I was wondering if it's possible to get the new unique ID column from the users table and insert it into the new row achivementOwnerID column. Hopefully, I made this clear. Thanks for your time and help! |
|
|
21.03.2019, 08:49:05
Post
#2
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 12.04.2018 Ostrzeżenie: (0%) |
What you mean "get the new unique ID"
You can get only one unique id from table row. There is no opton set up another one with different no. But you can always add some new randomly no. and get it. Ten post edytował hopaj 21.03.2019, 09:06:35 |
|
|
21.03.2019, 20:36:30
Post
#3
|
|
Grupa: Zarejestrowani Postów: 1 841 Pomógł: 226 Dołączył: 20.03.2005 Skąd: Będzin Ostrzeżenie: (0%) |
Create table `achievmentOwner` with the columns `id` and `userId`,
|
|
|
Wersja Lo-Fi | Aktualny czas: 7.05.2024 - 19:43 |