Title: Pull data from table
Last modified: September 1, 2016

---

# Pull data from table

 *  Resolved [zamphere](https://wordpress.org/support/users/zamphere/)
 * (@zamphere)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/pull-data-from-table/)
 * I have a table full of mortgage rates and want to show a row at the top of the
   best rate (or lowest rate) from each column, here is the page I am currently 
   doing this and the page I am trying to re-create it in my new wordpress site:
 * Old Site: [http://www.lowestratecanada.com/canada-mortgage-rates](http://www.lowestratecanada.com/canada-mortgage-rates)
   
   New Site: [http://new.lowestratecanada.com/rates/](http://new.lowestratecanada.com/rates/)
 * I also want to be able to pull this rate data and post it on many other websites
   that I manage but only update this one table. I have done this in the past using
   MySQL and PHP but converting all my old sites to WordPress and having trouble
   getting this to work. I am clearly not advanced in this type of code. Is this
   possible using the TablePress plugin? On the old website I used code like this…
 * <?php
    mysql_connect(“mysql”, “ratesheetdb”, “RSdata!!692”) or die(“Can not connect.”);
   mysql_select_db(“ratesheet”) or die (“Can not find database.”); ?>
 * $variable_sql = “SELECT * FROM rates_main WHERE variable_rate != ” && variable_rate!
   = ‘-‘ ORDER BY variable_rate ASC LIMIT 1″;
    $variable_result = mysql_query($variable_sql);
   $variable_row = mysql_fetch_object($variable_result);
 * <? echo $variable_row->variable_rate; ?>
 * This worked great in my old designs but can’t get it to work within my new wordpress
   designs so trying to use TablePress to recreate this?
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/pull-data-from-table/#post-7600024)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Depending on how big your tables are, this might work, but it will need custom
   PHP programming as well.
    Therefore, as you have already set up everything in
   mySQL, I would suggest to stick with that.
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Pull data from table’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [column sorting](https://wordpress.org/support/topic-tag/column-sorting/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/pull-data-from-table/#post-7600024)
 * Status: resolved