Mysql ADDDATE() or DATE_ADD() with table columns?
- by John
How do I do something like the following
SELECT ADDDATE(t_invoice.last_bill_date, INTERVAL t_invoice.interval t_invoice.interval_unit)
FROM t_invoice
...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.
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?