I have no problem generating a report from a MySQL query or table. The problem starts when I want to add a variable in the report in each row.
For example, table "PRODUCTS": ID|PRODUCT-NAME|SHELF-LIFE
What's the best practice if I want to generate a report that shows me
ID
| NAME
| EXPIRE-DAY
Where: EXPIRE-DAY
= TODAY
+ SHELF-LIFE
Thanks in advance for your help, even a link would be greatly appreciate.
Three Options:
something like:
Select ID, NAME, SHELF-LIFE, DATE_ADD( CURDATE(), INTERVAL SHELF-LIFE DAY) as EXPIRE-DAY from mytable