vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Database Structure (https://vborg.vbsupport.ru/showthread.php?t=97891)

Logikos 10-08-2005 06:58 PM

Database Structure
 
I'm trying to plan a database structure for a custom mod. Its going to be a personal points, and this is how it will work.

Every saturday I will have a list of points that I will manually add myself. The week starts on saturday and ends on friday. I want to keep a record of points earned everyweek. For instance.

User1 has 150 points for week(1)
User1 has 125 points for week(2)
-------------------------------------------
Total Points: 275

What would be the best approach to handle the weeks orginaized?

Guest190829 10-08-2005 08:31 PM

You can make the week table auto increment.

Table Scheme: Name: points_record

userid
points_this_week
week_number

I would point total points in a separate table...perhaps the user table. Could be wrong though!

Marco van Herwaarden 10-09-2005 07:47 AM

Well it really depends on how long history you want to keep. If not too much, then maybe just a serialized array in the user table would be best.

filburt1 10-09-2005 02:25 PM

Don't serialize stuff into the database unless absolutely necessary. It defeats the purpose of using the database in the first place.

Logikos 10-09-2005 07:06 PM

Thanks guys, I think I figured out the best way. I'll let you know how it goes. :)


All times are GMT. The time now is 12:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00948 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete