title: Mysql ADDDATE() or DATE_ADD() with table columns?
body: <p>How do I do something like the following</p>
  
  <pre><code>SELECT ADDDATE(t_invoice.last_bill_date, INTERVAL t_invoice.interval t_invoice.interval_unit) 
    FROM t_invoice
  </code></pre>
  
  <p>...where the column t_invoice.last_bill_date is a date, t_invoice.interval is an integer and t_invoice.interval_unit is a string.</p>
  
  <p>What I like about the ADDDATE() function is that if I write a </p>
  
  <pre><code>SELECT ADDDATE('2010-01-31', INTERVAL 1 MONTH)
  </code></pre>
  
  <p>It conveniently returns the last day of February - 2010-02-28.  So it knows that 1 MONTH means 28 days for Feb (29 on leap year), 31 if odd number month, 30 if even number month.  I would like to preserve this feature in my query.</p>
  
  <p>Basically, I want to determine a person's next bill date based on his desired billing frequency.  Is there a better way to achieve this?</p>