1
So I’m having doubts about something that might not be complicated, I wanted to assign values (id’s) to the records that return from this:
SELECT * FROM `aldeias` where `userid`='-1'
Doing this will return only the id’s of the unowned villages (-1), but will be their id’s
|ID | ALDEIA | DONO
|1 | Aldeia 1 |-1
|3 | Aldeia 1 |-1
|7 | Aldeia 1 |-1
|8 | Aldeia 1 |-1
I wanted it to stay something like this:
ID.. |ID | ALDEIA | DONO
1 |1 | Aldeia 1 |-1
2 |3 | Aldeia 1 |-1
3 |7 | Aldeia 1 |-1
4 |8 | Aldeia 1 |-1
your ID column that has the numbers out of order is already primary key ?
– SneepS NinjA
Yeah, that’s right
– xdam98