• Resolved profodes

    (@profodes)


    Hello all,

    Im trying to make a ranking table in the formula 1 style.

    So position, driver, totalpoints, point race1, points race2, etc.

    Now I would like to add a rule to position. If the total points are the highest then he is in position 1, the one below is in position 2 etc.

    What is the code to achieve this?

    Kind regards,
    Roland

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    How are you calculating all these numbers? Are you entering them all? If so, why don’t you simply sort the table for the totalpoints column on its “Edit” screen?

    Regards,
    Tobias

    Thread Starter profodes

    (@profodes)

    no problem at all… we are just figuring out what’s all possible…
    Because our goal is to add data into the table from another source automatically.
    Therefore we would like to have that set automatically as well…

    To get to the second question… where can I find the databases created by TablePress?
    Because I cant find them in MYSQL.

    Kind regards,
    Roland

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Roland,

    thanks for the clarification. In that case, the TablePress Extension from https://tablepress.org/extensions/table-row-order/ might be helpful. It can sort the table just before it’s shown on the page.

    As for the table data: TablePress stores the table data as JSON-encoded two-dimensional arrays in the wp_posts database table, with a value of tablepress_table in the post_type column. The table settings/options are stored in the wp_postmeta table. Finally, general settings are stored in wp_options. Note that it’s discouraged to modify this data directly. You should use TablePress’ PHP functions for that.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘ranking system’ is closed to new replies.