I have a little problem with INNER JOIN in mysql query. I have two tables the first is 'kontrola' and 2nd is 'naruszenia' In 'kontrola' table I have rows:
- id
- podmiot
- miasto
- wszczeto
- zakonczono
naruszenie_id (Foreign KEY on 'naruszenia' table) In my naruszenia table I have:
id
- naruszenia
Now I want to display using INNER JOIN the naruszenie from 'naruszenia' table. I've create somethin linke this:
$listakontroli = $connecting->query("SELECT * FROM kontrola INNER JOIN naruszenia ON
kontrola.naruszenie_id=naruszenia.id");
But the result is that when I want to display records in table I have changed the ID of first table(kontrola) and the naruszenia_id still showing id from naruszenia table. How to change it to display properly the word not id.