So, I'm having doubts about something that might not be complicated, I wanted to assign values (id's) to the records that returned it:
SELECT * FROM 'aldeias' where 'userid'='-1'
Doing this, will return only the id's of the villages without owner (-1), but will be the id's of them
|ID | ALDEIA | DONO
|1 | Aldeia 1 |-1
|3 | Aldeia 1 |-1
|7 | Aldeia 1 |-1
|8 | Aldeia 1 |-1
I wanted it to look 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