Application messages
Posted: Tue Apr 21, 2009 11:59 pm
All,
How *bad* is it to store application success/failure messages in a db table? Heres what I'm doing..
- Add row(s) to db
- Iterate through the rows using PHP, assign each to an array in Smarty
- Truncate the table
- Display the messages in my Smarty template
There is the possibility of a message not being able to write to the db, then there is nothing to report the error, but using Smarty, and header() sometimes to redirect a user from script to script, i can't think of a better way.
The smarty community cannot seem to do so either..
How *bad* is it to store application success/failure messages in a db table? Heres what I'm doing..
- Add row(s) to db
- Iterate through the rows using PHP, assign each to an array in Smarty
- Truncate the table
- Display the messages in my Smarty template
There is the possibility of a message not being able to write to the db, then there is nothing to report the error, but using Smarty, and header() sometimes to redirect a user from script to script, i can't think of a better way.
The smarty community cannot seem to do so either..