Esempio n. 1
0
    private static function getDaySection($day, $section)
    {
        $db = new db();
        $db->connection->setFetchMode(MDB2_FETCHMODE_ASSOC);
        $types = array('text');
        $stmt =& $db->connection->query("SELECT * FROM Pageviews_by_Section WHERE day='{$day}' and section = '{$section}'");
        if ($row = $stmt->fetchRow()) {
            return $row;
        }
    }
    private static function getDayDevice($day, $device)
    {
        $db = new db();
        $db->connection->setFetchMode(MDB2_FETCHMODE_ASSOC);
        $types = array('text');
        $stmt =& $db->connection->query("SELECT * FROM Pageviews_by_Device WHERE day='{$day}' and device = '{$device}'");
        if ($row = $stmt->fetchRow()) {
            return $row;
        }
    }
    public static function url2db($name)
    {
        return str_replace('-', '_', $name);
    }
    private static function db2url($name)
    {
        return str_replace('_', '-', $name);
    }
}
PageViews::init();