Search code examples
mysqlwordpresspodscms

reading from a database using WordPress


I am very new to WordPress, I have very little knowledge with PHP. I read about PODS and I know how to create one and use pages / templates to display data.

The issue I am havingis, the PODS I was creating use static data entered via the WP dashboard, what I want is to read data from a database, I am using MySql (same DB that wordpress is using). is there a way to use PODS and read the data from the DB, or wordpress has a better way to handle data coming from the DB ?

Thanks


Solution

  • You should Look into the $wpdb variable (and class)
    http://codex.wordpress.org/Class_Reference/wpdb

    Do remember to declare it a global:

    <?php global $wpdb; ?>
    

    I am however not sure what you want.
    I advise staying close to wordpress.
    If you want to create your own custom post types without using code use moretypes