title: MySQL: Trigger error: #1193 - Unknown system variable 'PurchasePrice'
body: <p>I'm trying to create a trigger where if someone says they have a discount code, the purchaseprice of their ticket drops by $10.</p>
  
  <p>I ran the code:</p>
  
  <pre><code>CREATE TRIGGER alterPurchasePrice AFTER INSERT ON CustomerOrders FOR EACH ROW 
  BEGIN IF DiscountCode = 'yes' THEN SET PurchasePrice = Cost - 10 END$$
  </code></pre>
  
  <p>But got the error:</p>
  
  <pre><code>#1193 - Unknown system variable 'PurchasePrice'
  </code></pre>
  
  <p>However, I have that column in my table. So I don't understand why it's not recognizing it?</p>