A few years back, I was working on an inventory system I was writing in C++. I had many an enjoyable night, after 2-3 glasses of Merlot, coding and debugging. As the previous posters said, be sure to test while sober... and also to review your code. It may be hard to explain code fragments like:
$LeafySQL->prepare("select car from inventory...");
$Lettuce = $LeafySQL->rows;
$BigMac = $Lettuce + $Tomato + $DeadCow;
# Oops, that didn't compile, $BigMac isn't a string...
# but maybe in an alternate universe, oh just maybe...