Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep track of collectible views and stash views #171

Closed
SomethingSexy opened this issue Jan 22, 2015 · 3 comments
Closed

Keep track of collectible views and stash views #171

SomethingSexy opened this issue Jan 22, 2015 · 3 comments
Milestone

Comments

@SomethingSexy
Copy link
Owner

Keep a tally of how many people view a specific collectible and user stashes. We can use this for trending data.

This would be helpful for #169 to figure out which collectibles to make sure we have affiliate links for.

@SomethingSexy
Copy link
Owner Author

We don't want to do updates every time a collectible is view. We are going to do inserts every time a collectible is view. Then we can have a job that runs every so often to update the count on the collectible.

SomethingSexy added a commit that referenced this issue Jan 27, 2015
Signed-off-by: Tyler Cvetan <[email protected]>
@SomethingSexy
Copy link
Owner Author

-- phpMyAdmin SQL Dump
-- version 4.0.4

-- http://www.phpmyadmin.net

-- Host: localhost
-- Generation Time: Jan 27, 2015 at 01:35 AM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 */;

-- Database: cs_2_13


-- Table structure for table collectible_views

CREATE TABLE IF NOT EXISTS collectible_views (
id int(10) NOT NULL AUTO_INCREMENT,
collectible_id int(10) NOT NULL,
ip varbinary(16) NOT NULL,
user_id int(10) DEFAULT NULL,
processed tinyint(1) NOT NULL DEFAULT '0',
created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (id),
KEY collectible_id (collectible_id),
KEY processed (processed)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5 ;

/!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

@SomethingSexy SomethingSexy added this to the 3.10.0 milestone Jan 27, 2015
@SomethingSexy
Copy link
Owner Author

Event is being tracked now.

SomethingSexy added a commit that referenced this issue Jan 27, 2015
Signed-off-by: Tyler Cvetan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant