FRS: fix php warning
Stats : remove dead code, period2sql function never used