title: How to check and update table #1 data from table #2?
body: <p>I have 2 table in my database.</p>
  
  <p>Table #1</p>
  
  <pre><code>-------------------------------------------------------------------------
  | name | family | phone | email | gender | phone2 | address | birthdate |
  -------------------------------------------------------------------------
  </code></pre>
  
  <p>Table #2</p>
  
  <pre><code>-----------------------------------------
  | gender | address | phone | birthdate |
  -----------------------------------------
  </code></pre>
  
  <p>in table #1 columns address and phone2 is empty and columns gender and birthdate values is same as table #2.</p>
  
  <p>How can I read data from table #2 and update address and phone2 in table #1 with values from table #2 address and phone columns when gender and birthdate is the same in each row?</p>
  
  <p>for example:
  this is some data in Table #1</p>
  
  <pre><code>-------------------------------------------------------------------------
  | name | family | phone | email | gender | phone2 | address | birthdate |
  -------------------------------------------------------------------------
  | john | doe    | 12345| t@t.com| Male  |         |         | 1980-01-01|
  -------------------------------------------------------------------------
  | mike | clark  | 65432| x@y.com| Male  |         |         | 1990-01-01|
  -------------------------------------------------------------------------
  | Sara | King   | 875465| a@b.com|Female|         |         | 1970-01-01|
  -------------------------------------------------------------------------
  </code></pre>
  
  <p>and here is some data in table #2</p>
  
  <pre><code>-----------------------------------------
  | gender | address | phone | birthdate  |
  -----------------------------------------
  | Male   | 1704test|0457852|1980-01-01  |
  -----------------------------------------
  | Female | 1705abcs|0986532|1970-01-01  |
  -----------------------------------------
  | Male   | 1602cyzd|0326589|1990-01-01  |
  -----------------------------------------
  </code></pre>
  
  <p>I want to update table #1 with data from table #2 and check gender and birthdate and make table #1 like</p>
  
  <pre><code>-------------------------------------------------------------------------
  | name | family | phone | email | gender | phone2 | address | birthdate |
  -------------------------------------------------------------------------
  | john | doe    | 12345| t@t.com| Male   |0457852 |1704test | 1980-01-01|
  -------------------------------------------------------------------------
  | mike | clark  | 65432| x@y.com| Male   |0326589  |1602cyzd| 1990-01-01|
  -------------------------------------------------------------------------
  | Sara | King   | 875465| a@b.com|Female |0986532  |1705abcs| 1970-01-01|
  -------------------------------------------------------------------------
  </code></pre>
  
  <p>How can I do this?</p>