This topic is locked

List of totals from a tabel

12/10/2008 7:47:08 PM
PHPRunner General questions
H
hsmdk author

Hi There hope some one can lead mw on the rigtht path.
I have some simple tabels
User with UserID And Name
I have a "Matchlist" withsome fields MatchID Date And some other info fields
I do also have a "Matchresults" with MatchresID MatchID(lookup) UserID (lookup) Result and Point
How do i make a list in a order there have the user with most point on top and down. and link to a list with all matchresult per user on this list
Secound - it is possible to make a lookup in another DB (same kind - MYSQL)
Thanks ind advanced

J
Jane 12/11/2008

Hi,
to sort records add Order By clause on the Edit SQL query tab.

Unfortunately PHPRunner do not support more then one database in one project. As workaround you can edit generated include/commonfunctions.php file manually, connect to another database and point your dropdown to this database.

H
hsmdk author 12/12/2008

Hi jane,
Thanks for you reply.
I think i dident express my self good enough.
I have this tabel " matchres" with these fields
MatchID,UserID,Username,Result,Point
There could eg be following posts
1,10,Jack,102,3

1,11,Suzy,100,5

1,12,luke,101,3

2,12,luke,99,5

2,11,Suzy,98,5

3,10,jack,102,6
I would like to have a list (based on these posts) to look like this.
Place Name Point

1 Suzy 10 (sum of match 1 and 2 and so far)

2 Jack 9

3 Luke 8
Hope this more understandable
Tanks in advance

Hi,

to sort records add Order By clause on the Edit SQL query tab.

Unfortunately PHPRunner do not support more then one database in one project. As workaround you can edit generated include/commonfunctions.php file manually, connect to another database and point your dropdown to this database.

H
hsmdk author 12/27/2008

Any one there have an idear to solve this issue ? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=36306&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' />

Hi jane,

Thanks for you reply.
I think i dident express my self good enough.
I have this tabel " matchres" with these fields
MatchID,UserID,Username,Result,Point
There could eg be following posts
1,10,Jack,102,3

1,11,Suzy,100,5

1,12,luke,101,3

2,12,luke,99,5

2,11,Suzy,98,5

3,10,jack,102,6
I would like to have a list (based on these posts) to look like this.
Place Name Point

1 Suzy 10 (sum of match 1 and 2 and so far)

2 Jack 9

3 Luke 8
Hope this more understandable
Tanks in advance

J
Jane 12/29/2008

Hi,
I see what you're saying.

Edit SQL query on the Edit SQL query tab for this purpose.

Here is just a sample:

select

MatchID,

Username,

sum(Point) as SumPoint

from TableName

group by Username