• Resolved iLobster

    (@ilobster)


    I’m setting up a plugin where I had to set up some additional tables. I need to query those tables. how do I do so?
    I’m sure there’s something in the codex, but i wasn’t able to find it.
    I tried $wpdb->query($query); but it’s making the script fail.

Viewing 3 replies - 1 through 3 (of 3 total)
  • What is result of your queries to standart WP tables?

    This is my code:

    ini_set( display_errors, true );
    require(‘wp-blog-header.php’);
    $r = $wpdb->query(“SELECT * from LUM_Category”);
    print ‘<pre>’; print_r( $r ); print ‘</pre>’;

    It prints ‘6’. It’s right, there are 6 records in that table (categories table of Vanilla forum).

    Thread Starter iLobster

    (@ilobster)

    wow, I was so stupid, I forgot to make it global 😉
    That’s what happens when you don’t have time to sleep 😉
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘querying database’ is closed to new replies.