Want to know if your Geeklog SQL is executed flawlessly? Even we Geeklog experts get tripped up on DB errors periodically. So how do you identify problem fast? Well, first, note that ALL database errors in Geeklog 1.3 and later get logged to error.log. Better than the PHP SQL error messages, the Geeklog error.log message will contain the entire SQL used to create the error making troubleshooting simple.
Now that's fine and dandy, but you need to know when an error occurs and, let's face it...we are all to lazy to check the logs regularly. Well add this simple line to your /path/to/geeklog/system/databases/mysql.class.php at the end in dbError() right before the return:
mail('email@example.com','Geeklog Database Error!',@mysql_errno() . ': ' . @mysql_error() . " SQL in question: $sql","From: Geeklog DB Server"
The reason people blame things on previous generations is that there's only one other choice.