I have two table:
- Table 'temp_hsl'
|id|kota_a| |41| 1 | |42| 2 |
- Table 'jarak kota'
|id|kota_a|kota_b | jarak| |1 |1 |1 | 0 | |2 |1 |2 | 2 | |3 |1 |3 | 3 | |4 |2 |1 | 2 | |5 |2 |2 | 0 | |6 |2 |3 | 3 | |7 |3 |1 | 3 | |8 |3 |2 | 3 | |9 |3 |3 | 0 |
I want end result:
|id|kota_a|kota_b | jarak| |1 |1 |1 | 0 | |2 |1 |2 | 2 | |3 |2 |1 | 2 | |4 |2 |2 | 0 |
The result above is based on a relation table with table temp_hsl. How do it with command mysql? I 've tried , but the results of its query looping continues.