Jump to content

sdsportsfanatic

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sdsportsfanatic's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Forums update view counts every time a post is viewed If your creating a column for views: mysql_query("ALTER TABLE table_name ADD COLUMN views INT") or die(mysql_error()); If you look at the data size of this column after a few weeks youll find its very minimal. I wouldn't be creating just a column for views, I would need a whole table to timestamp each one. I would need this to know how many views a user has received that occurred that day, that week, that month, and all time. Storing one number for each user doesn't allow me to do this.
  2. Thank you for the explanation. I think I understand and I'm going to test it out tonight. One question I still have is in regards to creating tables for views and plays. Can it be bad to store all of this data? Every time a user's page is visited, I will need to add an entry to the views table. Same with every time a song is played. I'm guessing this will result in over 1,000,000 entries after 6-10 months that will only grow. Is this inefficient or could it be problematic for my database/hosting? Thanks again.
  3. I have a database table storing users on my site. I want to be able to filter the users in 5 different ways (amt of favs, amt of views, amt of plays, amt of reviews, highest rating). I have a table storing all favs on the site and all the reviews on the site; and I have fields for all users storing amt of views, amt of plays, and rating. I do not have trouble filtering by views, plays, and rating. I was unsure how to filter by favs and reviews, so I added those fields to the users table and they are updated accordingly. Now I do not have trouble filtering any of those parameters. But I would like to take the filters further, and filter the same data, but only account for numbers accumulated over the past day, the past week, and the past month, in addition to all time. ie: filtering all time may display that a user has 102 views, but filtering by today would give them only 3. I am unsure if this is possible. My one idea involves making a table for every parameter and storing each statistic with a timestamp. If I had to do that I would have multiple tables with over 1,000,000 entries. This would mean storing every view, every play, etc. If this is the only way to execute my goal, I would still need assistance. How could I filter the users based on the amount of entries they have in another table? I am a little new to MySQL so I am unfamiliar with how this is done. Is there any easier way to do this? Here is the page: http://www.sdsportsfanatic.com/temp/iamcrack/browse_artists.php As you can see, I am new to the forum. I don't really like to register on a new forum and ask for help before contributing anything; but I've really hit the wall on this one and I couldn't find any solutions by searching online. I appreciate your help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.