I want to do a INNER JOIN on a table on himself to get only one value, so i make
SELECT *,u2.name AS ownername FROM user u INNER JOIN user u2 ON u.owner = u2.id
The problem i have is that if I try for example to print the id value, it takes it from the u2 values... And there is too many fields to rename all of them with u.id AS... u.surname AS...
I think this will be easy to fix but i dont know how :(
Thank you for any idea