title: Trigger insert into multiple tables
body: <p>I have got 2 tables named: <strong>train_information</strong> and <strong>axle</strong>.</p>
  
  <pre><code>Train_information
  </code></pre>
  
  <p>has the folowing:</p>
  
  <pre><code>train_id (PK)
  train_name
  train_length
  number_of_axles
  </code></pre>
  
  <hr>
  
  <pre><code>axle
  </code></pre>
  
  <p>has the folowing:</p>
  
  <pre><code>axle_id (PK)
  train_id(FK)
  axle
  </code></pre>
  
  <p>When I insert something on <strong><em>train_information</em></strong> and let's say for example put the number 16 in <strong><em>number_of_axles</em></strong>. I want the table <strong>axle</strong> to get that same information automatically.</p>
  
  <p>How do i do this with a trigger?</p>
  
  <p><strong><em>EDIT:</em></strong></p>
  
  <p>it works now with this code:</p>
  
  <pre><code>CREATE TRIGGER TriggerName AFTER INSERT ON train_information
  FOR EACH
  ROW 
  BEGIN 
  INSERT INTO axle( train_id, axle ) 
  VALUES (
  NEW.train_id, NEW.number_of_axles
  );
  
  END
  </code></pre>
  
  <p>But right now, it enters for example the number 16 in the table <strong>axle</strong>
  but i want it to go like: </p>
  
  <pre><code>axle_id = 1
  train_id = 1
  axle = 1
  
  axle_id = 2
  train_id = 1
  axle = 2
  
  axle_id = 3
  train_id = 1
  axle = 3
  </code></pre>
  
  <p>Is this posible?</p>