Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Finding the next SQL Auto increase?
Forum PHP.pl > Forum > PHP
black77
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!
hopaj
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.
Tomplus
Create table `achievmentOwner` with the columns `id` and `userId`,
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.