<?php if ($r = mysql_query($sql)) { // good } else { if ($ONLINE) { print "Please come back later.<br />"; error_log("[DB][$sql]"); } } ?>