Support » Plugin: TablePress » query tables and displaying results

  • Resolved mdrabble

    (@mdrabble)


    I’ve been pointed in the direction of your plugin which might help in display data similar to the following page (http://vichigh.com/alumni/search-by-year.php)

    The idea is to have a page similar to the above so when a user clicks on a year, they are shown a page with registered users associated with that year. The displayed results are then linked to associated users profile.

    I have set up the basic site and populated with test data and I am struggling to discover how i can get the plugin to do what i want.

    I have basic knowledge of wordpress and even less knowledge when it comes to php/mysql!

    I have worked out the sql code for the first but I have no idea how to translate that into the plugin with links

    Any help is greatly appreciated

    • This topic was modified 5 years, 5 months ago by mdrabble.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    TablePress does not directly provide querying with mySQL or similar.
    However, for your idea, you could maybe take a look at the TablePress Extension from tablepress.org/extensions/row-filter/
    If you then combine that with the TablePress Extension from https://tablepress.org/extensions/shortcode-filter-get-parameter/ , you would have URLs that simply need to contain the desired year, so that the table on the page will only show the relevant entries.
    Then, you’d simply have to create and “overview” page which shows the links with the individual year parameters.

    Regards,
    Tobias

    Thread Starter mdrabble

    (@mdrabble)

    Thanks replying with info on how I can do possibly do this.

    Having downloaded the extensions I am still struggling to understand how to pull in the data other than manually entering the data or manually exporting and importing.

    Not to worry, I shall keep trying.

    Many thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I’m not sure what you mean with “pulling in”. You would first need to get all your data into a TablePress table, e.g. by somehow getting it into Excel and then saving it to a CSV file, which you can then import into TablePress.

    Regards,
    Tobias

    Thread Starter mdrabble

    (@mdrabble)

    I was looking a way to populate a table dynamically by querying a wordpress table and then displaying the details based on that query.

    I’m using BuddyPress extended Profiles and have a field called LeavingYear.

    I wanted a create a dynamic table by by filtering and grouping results together

    Leaving Year | Number Associated
    2000 | 3
    2001 | 2
    2004 | 4

    I think this isn’t possible without manually coding a page to do this so I have made a start creating a custom page.

    Thank you for replying and trying to help 🙂

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    something like this is not possible with TablePress. When running a direct query against a WordPress database table, I recommend using PHP to directly generate table HTML code.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘query tables and displaying results’ is closed to new replies.