• Resolved safnasash

    (@safnasash)


    Hello,
    i need to get the values of single column of table that i have created using table press . for eg; i have a table with name and age as two columns. how do i get or print the values entered in the the age column in my template page

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please explain this a bit more? In what format do you need the column values? Do you just want a table with that one column?

    Regards,
    Tobias

    Thread Starter safnasash

    (@safnasash)

    Hello sir,
    yes i can detail what i need, i am working on my client site which is money exchange website, so they used table press to show the bank transfer rate of money exchange for 5 countries . the table is daily updated by the admin, so the values are changing day by day. my requirement is i need to get the values from this table to create custom code of currency conversion, means if i need to to convert one currency to another , i need to get the transfer rate of respective country from that table. the table contain country name and transfer rate. i have to fetch each row into different variables, so that i can easily use it to my custom code.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the explanation! If you plan to use the data in the tables for your own calculations, you will need to load the raw table data. For that, you can e.g. use PHP code like

    $table_id = '123';
    $table = TablePress::$model_table->load( $table_id, true, false );

    $table will then be an array with all table information, and $table['data'] will be a two-dimensional array with the data.

    Regards,
    Tobias

    Thread Starter safnasash

    (@safnasash)

    Thank you for the valuable reply, i tried with your code and it gives the result what i need.
    Thankyou

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘get column values’ is closed to new replies.