Welcome Guest, Not a member yet? Register   Sign In
display data from the database (summarizes data)
#8

I think the table structure is making this very complex.
If you store the income values, you'd better save every entry for every country separately.

E.g.
ID, income_user, income_country, income_count, income_amout.

User '00003' would get 4 records in stead of one:
00001, US, 1, 10
00001, PH, 3, 30
00001, CN, 2, 20
00001, TH, 9, 90

This would make it much easier to count the total counts and amounts per user and per country, and display them in a summary.
Reply


Messages In This Thread
RE: display data from the database - by php_rocs - 04-21-2019, 11:01 AM
RE: display data from the database - by DELE - 04-21-2019, 08:15 PM
RE: display data from the database (summarizes data) - by Wouter60 - 04-22-2019, 11:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB