Home > アーカイブ > 2007-12-30

2007-12-30

wordpress 2.3.2

wordpressを2.3.2にアップグレードしました。
ついでにCounterize IIもバージョン 2.12.3にアップデートしました。

カウンタ表示用にcounterize.phpには

# Returns amount of hits yesterday.
function counterize_gethitsyesterday()
{
$today = date(“Y-m-d”);
$yesterday = date(“Y-m-d”,strtotime(“-1 day”));
$sql = “SELECT COUNT(1) FROM “.counterize_logTable().” WHERE timestamp >= ‘$yesterday’ AND timestamp < '$today' ";
$wpdb =& $GLOBALS['wpdb'];
return $wpdb->get_var($sql);
}

# Returns amount of unique hits yesterday
function counterize_getuniquehitsyesterday()
{
$today = date(“Y-m-d”);
$yesterday = date(“Y-m-d”,strtotime(“-1 day”));
$sql = “SELECT count(DISTINCT ip) FROM “.counterize_logTable().” WHERE timestamp >= ‘$yesterday’ AND timestamp < '$today' ";
$wpdb =& $GLOBALS['wpdb'];
return $wpdb->get_var($sql);
}

を追加してます。

Home > アーカイブ > 2007-12-30

Return to page top