Sanjeev Sanjeev - 1 year ago 96
SQL Question

How to Display mysql table data in a wordpress page?

My aim is to develop a standard website using wordpress. I need to display data from a table in mysql database on my wordpress page.I have created a table in the same database that wordpress was installed.(DBname-digitigers,table_name:BookDetails: 13 columns).
Please help me.

Answer Source
    global $wpdb;
      $results = $wpdb->get_results( "SELECT * FROM table_name order by id DESC"  );
foreach($results as $res) { 

        //echo $res->col1;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download