Jump to content

Recommended Posts

Ok I am just looking at where to start this  what I am trying to do is  take from text below always formatted same way  and pull the date  1st place 1st place email 2nd place 2nd place email 3rd place 3rd place email sometimes there is 2 of them  and then pull each of the players points and put them all into tables in mysql 

in MySQL table I will have 3 tables

1st one is

email list

headings

id, playername,email

2nd one is

points

headings

playername points date

and 3rd one

Tourneyofchampions

headings

playername email(which if blank will pull from email table, if filled will update email table) date

 

below is an example of the input what im looking for is a place to start if you have any clarifications I will be happy to answer them

 

Nojoks's Tourney Bracket Tool Version 1.2.1.84
Tournament:  DeepBlueSea
Date:  04/20/2013
Day:  Saturday
Scheduled Start:  1:00
Actual Start:  4:00:02 PM
Closed:  4:11:43 PM
Host:  justme67 (UBG_shorty)
Number of Players:  19

 

1st place:  DESERTWARRIOR
1st place email:  [email protected]
2nd place:  poetree
2nd place email:  [email protected]
3rd place:  TM7_crazykarma
3rd place email:   [email protected]

 

START POINTS
DBS_Arielle 1
heli_guy2 1
keithsgame 1
MiaBela 1
PAL_USA_14KT 1
pirat3 1
TM7_sundgo 1
UBG_Angel_D_8 1
ziko_14 1
_BOMBER_ 3
_Antoinette_ 4
mawdryn65 4
olddanny1 4
The_Romano 4
ADG_Ronycezar 7
onaroll 7
TM7_crazykarma 19
poetree 32
DESERTWARRIOR 45
UBG_shorty 10
STOP POINTS

PLAYER STATISTICS (can be imported into Excel):
Name, Wins, Losses, Byes, Boots, Booted, DQed
MiaBela, 0, 1, 0, 0, Y, N
UBG_Angel_D_8, 0, 1, 0, 0, N, N
TM7_crazykarma, 2, 1, 1, 0, N, N
mawdryn65, 1, 1, 0, 0, N, N
DESERTWARRIOR, 5, 0, 0, 0, N, N
pirat3, 0, 1, 0, 0, N, N
_Antoinette_, 1, 1, 0, 0, N, N
heli_guy2, 0, 1, 0, 0, N, N
TM7_sundgo, 0, 1, 0, 0, N, N
olddanny1, 1, 1, 0, 0, N, N
ADG_Ronycezar, 2, 1, 0, 0, N, N
ziko_14, 0, 1, 0, 0, N, N
PAL_USA_14KT, 0, 1, 0, 0, N, N
onaroll, 2, 1, 0, 0, N, N
The_Romano, 1, 1, 0, 0, N, N
DBS_Arielle, 0, 1, 0, 0, N, N
keithsgame, 0, 1, 0, 0, N, N
poetree, 3, 1, 1, 0, N, N
_BOMBER_, 0, 1, 1, 0, N, N

 

 

ok so i came up with this code to show

04/20/2013

1:00

DESERTWARRIOR

 [email protected]
poetree
[email protected]
TM7_crazykarma
[email protected]

 this is the code NOT TESTED YET

<?php
$date=preg_match('/Date:\s+(\d{2}\/\d{2}\/\d{4})/');
$time=preg_match('/Scheduled Start:\s+(*)');
$1stplace=preg_match('/1st place:\s+(*)');
$1stplaceemail=preg_match('/1st place email:\s+(*)');
$2ndplace=preg_match('/2nd place:\s+(*)');
$2ndplaceemail=preg_match('/2nd place email:\s+(*)');
$3rdplace=preg_match('/3rd place:\s+(*)');
$3rdplaceemail=preg_match('/3rd place email:\s+(*)');
print ($date);
print ($time)
print ($1stplace);
print ($1stplaceemail);
print ($2ndplace);
print($2ndplaceemail);
print ($3rdplace);
print ($3rdplaceemail)
?>

now 3 questions

1 how do i distiguish if there is 2 sets of 3rd places so if top section looks like this

1st place:  DESERTWARRIOR
1st place email:  [email protected]
2nd place:  poetree
2nd place email:  [email protected]
1st place:  DESERTWARRIOR
1st place email:  [email protected]
2nd place:  poetree
2nd place email:  [email protected]
3rd place:  TM7_crazykarma
3rd place email:   [email protected]

1st place:  DESERTWARRIOR
1st place email:  [email protected]
2nd place:  poetree
2nd place email:  [email protected]
3rd place:  UBG_Shorty
3rd place email:   [email protected]

 

2nd question is if using a form to put it into it

<input type="text" name="playername"> what do i use in place of player name seeing it is multiple things in it

 

and finally is the code above basically right on what i am trying to do

thank you for all your help

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.