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..
Application messages
Moderator: General Moderators
-
msurabbott
- Forum Commoner
- Posts: 33
- Joined: Thu Jan 01, 2009 10:18 pm
- Location: Chicago, IL, USA
Re: Application messages
Not good to save errors in db that way. How you manage the sessions? If someone raises an error but just in the same time another user opens same file he will see the error of the other and the original user to whom is the error will not see it because it is truncated
You can use sessions instead.
You can use sessions instead.
-
msurabbott
- Forum Commoner
- Posts: 33
- Joined: Thu Jan 01, 2009 10:18 pm
- Location: Chicago, IL, USA
Re: Application messages
but i cannot clear the session from my smarty template.. nor can i access the session from inside classes (i create errors from the class in the class file)