Forum Moderators: coopster

Message Too Old, No Replies

Help on PHP MYSQL

give point to result

         

xenter

12:22 pm on Apr 23, 2010 (gmt 0)

10+ Year Member



hi experts , im designing a result of game program that get the time of players from own team and giving to them the right point ,but the important thing is the 2 of 3 players of team going to get point , for example :

teamID - playerName

1 - nameA1 ----> point=100
1 - nameB1 ----> point=90
1 - nameC1 ----> IGNORE
2 - nameA2 ----> point=80
2 - nameB2 ----> point=70
2 - nameC2 ----> IGNORE
3 - nameA3 ----> point=60
3 - nameB3 ----> point=50
3 - nameC3 ----> IGNORE

how can i to do this ?

Matthew1980

12:40 pm on Apr 23, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there xenter,

Welcome to the forum!

I'm not really understanding the idea of this "program", but from what I see from the data, you literally just want to ignore the "C" case for each name; in whichcase you could just specify in an if something like:-

(Pseudo code, one of many ways to do this too:))

if(substr_count($TheNameVar, "C"))//this is provided as the name would not contain a C at any point
{
//ignore
}
else{
//process
}

Would this be data being pulled from a DB or being inserted into a DB?

Hopefully I have understood you correctly :)

Cheers,
MRb

xenter

1:26 pm on Apr 23, 2010 (gmt 0)

10+ Year Member



thanks Matthew for reply , i think this picture is more useful

as you see this picture , in team columns , there is 3 "Heyat Kerman" and only 2 of them marked (red color) going to get point -- the point of 3rd player (black color) == 0.
this is the game that 2 of 3 player of each team is winner and get point .. so this is what i needed to develop . can you show me how can i do that ?

thanks again

[edited by: jatar_k at 1:32 pm (utc) on Apr 23, 2010]
[edit reason] sorry no urls thanks [/edit]