• Resolved dicegame

    (@dicegame)


    Hi everyone!

    I’m looking to create a query which pulls data from a vbulletin table. I’m unsure how queries work on WordPress. My Vbulletin tables is on the same database as the WordPress tables.

    This is what i’ve got:

    <?php  if (is_user_logged_in()) {
    
    global $userdata;
    get_currentuserinfo();
    
    $user = $userdata->user_login;
    
    $userhub = $wpdb->get_col("SELECT userhub
    	FROM user
    	WHERE username = $user");
    
    $userhubimage = $row[userhub];
    
    echo "$userhubimage";
    
    }
    
         }  else {
    
               echo "Welcome, visitor!";
    }
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘SQL Query’ is closed to new replies.