title: TRIGGER not inserting values in table
body: <p>I have the following <code>trigger</code></p>
  
  <pre><code>CREATE TRIGGER Insert_Orders BEFORE INSERT ON `Orders`
  FOR EACH ROW BEGIN
      INSERT INTO Payments (RestaurantPaymentInVAT, VATID) VALUES (
          (SELECT Get_RestaurantPaymentInVAT(NEW.`OrderID`)), 1);
  END $$
  </code></pre>
  
  <p>However <code>payments.RestaurantPaymentInVAT</code> in the table results window doesn't show my any kind of non-null results. All of it is <code>null</code>. HOWEVER:</p>
  
  <p>When I test it as a standalone query </p>
  
  <pre><code>SELECT Get_RestaurantPaymentInVAT(NEW.`OrderID`)
  </code></pre>
  
  <p>It gives the correct value.</p>
  
  <p>What am I doing wrong?</p>