Our DBA found a script created by one of our engineer, this script is use to fix our database slave error problem. Thought he should share this script with everyone, so for those who need this fix script, cheer.
Read the rest of this entry »
slave fix script wtf
March 11th, 2009php wtf code
March 11th, 2009Well, I am not a php guy but I thought this code seem pretty interesting, I hope someone can enlighten me on logic since I know this is not a typical code. I saw this piece of code in our new system.
$count = $this->count();
if ($count !== false) {
$string .= sprintf("Sub-id count: %d\n", $count);
foreach ($this->subfrauds as &$sub) {
ob_start();
echo $sub;
$string .= ob_get_clean() . "\n";
}
}
return $string
