How can I write my code to attempt a database action but continue executing code on failure?
- by Chris
Simple question I guess, I want to use PHP to write an update to an existing row in my database, if it doesn't happen I want to log the failure but continue executing the code. While it would be nice to have records of failures to track down issues, that the update failed isn't that important to my user, nor will it affect the running of any other code; the query is simply for a 'cosmetic' but entirely unnecessary piece of information.
My database class's query function is set to die on failure, could I modify that or is there another way of doing it without altering my standard query code?