title: SQL Trigger affect just the first record
body: <p>I have a trigger called <code>movimentacoes</code>, this trigger should increase <code>integralizadas</code> column in <code>cooperados</code> table when a new record is added to the <code>mov</code> table. Actually it does, but just to the first record in <code>cooperados</code> table</p>
  
  <p>here is my trigger</p>
  
  <pre><code>DELIMITER $$
  
  CREATE TRIGGER movimentacoes AFTER INSERT ON mov
  FOR EACH ROW
  BEGIN
      UPDATE cooperados c
          SET integralizadas = c.integralizadas + new.valor
      WHERE c.id = new.id_coop;
  
  
  END;
  
  $$
  
  DELIMITER ;
  </code></pre>
  
  <p>cooperados table</p>
  
  <pre><code>id            | bigint(20) PRI  NULL    auto_increment
  created_at    | timestamp       NULL    
  updated_at    | timestamp       NULL    
  nameCoop      | varchar(255)    NULL    
  numCoop       | int(11)         NULL    
  cpfCoop       | varchar(11)     NULL    
  dtCad         | date            NULL    
  dtDem         | date            NULL    
  description   | text            NULL    
  subscritas    | decimal(6,2)    NULL    
  integralizadas| decimal(6,2)    NULL    
  aintegralizar | decimal(6,2)    NULL    
  status        | enum('ativo','inativo')
  </code></pre>
  
  <p>mov table</p>
  
  <pre><code>idMov       bigint(20) PRI  NULL    auto_increment
  created_at  timestamp       NULL    
  updated_at  timestamp       NULL    
  id_coop     bigint(20)      NULL    
  valor       decimal(6,2)    NULL    
  </code></pre>
  
  <p>the trigger just works when the <code>cooperado.id</code> is 1</p>