PHP Classes

Nice Post

Recommend this page to a friend!

      PHP Classes blog  >  8 defensive programmi...  >  All threads  >  Nice Post  >  (Un) Subscribe thread alerts  
Subject:Nice Post
Summary:In response to the error logging.
Author:David Noel
Date:2007-05-02 22:16:15
Update:2007-05-03 00:01:20

  1. Nice Post   Reply   Report abuse  
Picture of David Noel David Noel - 2007-05-03 00:01:20
I have done a similar practice for when a mysql_query messes up.

So I don't lose the data (that would have been modified, or changed), I made a custom function to log this data elsewhere.

mysql_query($query) or MyLog($query,mysql_error(),$_SESSION['id'])

The function simply logs the intended query, who it was suppose to be for, and the official error. It is useful to catch attempted failed inject attempts too.

For more information send a message to info at phpclasses dot org.