Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AntoineH

    (@antoineh)

    There are several things that have to be changed. The leagues table is joined in a lot of places.

    1. user registration and user admin to be able to select multiple leagues.
    2. check statistics/charts/ranking page if players are included for a chosen league and no double rows are shown.
    3. score calculation and ranking calculation.

    The third point is the biggest/most complex change, I think.

    I’m not sure if the above list is complete. I didn’t check the complete code.

    Thread Starter latinosamorir

    (@latinosamorir)

    Thanks.

    I noticed that the league database table is two column: user_id and league_id.

    Can we have multiple user_ids on the table? Will having duplicate user_ids cause an error in your code?

    Thanks.

    Giovanni

    Thread Starter latinosamorir

    (@latinosamorir)

    actually … i get this error:

    SQL query:
    INSERT INTO latinos3_wor3.pool_cgq_league_users (user_id, league_id) VALUES (‘1’, ‘4’)
    MySQL said: Documentation

    #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’

    Any ideas or work around?

    Plugin Author AntoineH

    (@antoineh)

    You’ll have to make the user_id and league_id a compound primary key. The combination of user_id and league_id are unique in your case.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple Leagues’ is closed to new replies.