mysql - how to query from two tables? -


this question has answer here:

i have 2 table:

  1. table 'temp_hsl'
 |id|kota_a|   |41| 1    | |42| 2    |  
  1. 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 based on relation table table temp_hsl. how command mysql? 've tried , results of query looping continues.

not sure asking, should able like: select * tablex fieldx in (select fieldx tabley)


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -