Skip to:
Content
Pages
Categories
Search
Top
Bottom

sql statement trouble

  • @firetag

    Participant

    I don’t know what I’m doing wrong it just doesn’t work…

    function populate(){
    global $wpdb;
    $sql = $wpdb->prepare( "SELECT * FROM {$bp->mlgfantasy->user_table} WHERE owner_id = %d", $this->owner_id );
    // I think this like is wrong but Im not sure^^^^
    $userinfo = $wpdb->get_row( $sql );
    if($userinfo){
    $this->id = $userinfo->id;
    $this->owner_id = $userinfo->owner_id;
    $this->pick_one = $userinfo->playerone;
    $this->pick_two = $userinfo->playertwo;
    $this->pick_three = $userinfo->playerthree;
    $this->pick_four = $userinfo->playerfour;
    $this->score = $userinfo->score;
    $this->updateScore();
    }
    }

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘sql statement trouble’ is closed to new replies.
Skip to toolbar