Support » Plugins » WPDB -class problems

  • Hi,

    at the moment Im writing a plugin which needs database access.
    I tried to use the wpdb-class and have already set $wpdb global.

    Here’s the code:

    function foo() {
    global $wpdb;
    $wpdb->query(‘SELECT * FROM table’);

    This Error returns:
    “Call to a member function query() on a non-object in[..]”

    Thanks in advance.


  • The topic ‘WPDB -class problems’ is closed to new replies.