vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   MySQL: Sets and Such (https://vborg.vbsupport.ru/showthread.php?t=77350)

Adrian Schneider 03-02-2005 05:56 PM

MySQL: Sets and Such
 
I know you can use sets to store a set of data, but I was told using a regular text field would work better, because you get more than 64 members.

That being said, I have a few questions based on it.

Is it possible to expand a long list of numbers like 1,4,5,2,3,4,2,4234,2342,34234,262,62 into seperate numbers :

1
4
5
2
3
4
2 (just be able to differentiate them)
then run a query for each one (1 query, preferably), so each one would represent something like a userid.

Another problem I'm thinking will come up, will be table structure.

Each 'player' (table for players) will need to have 3 different 'scores' for each 'game'. (table for games) How would I set this kind of table relationship up?

Thanks.

sabret00the 03-02-2005 06:03 PM

i take it each of these "1,4,5,2,3,4,2,4234,2342,34234,262,62" is a playerid?

you could then use a seperate table

playerid | score1 | score2 | score3

and yes you can run a loop on an array

and in order to get em onto a new line you'll need to explode them :)

highlighted words can be investigated better over at php.net :)

if you don't understand from php.net come back and i'll try and explain better :)

Adrian Schneider 03-02-2005 06:10 PM

Thanks, I guess it was simpler than I thought, I seem to overcomplicate things in my head. :P


All times are GMT. The time now is 10:21 PM.

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.01511 seconds
  • Memory Usage 1,706KB
  • 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
  • (3)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