Skip to:
Content
Pages
Categories
Search
Top
Bottom

Updating a field in xprofile

  • Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    I’m trying to update a field in xprofile. This doesn’t seem to work:

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->bp_xprofile_data} SET value = %s WHERE ID = %d AND field_id=1", $fullname, $user_id ) );

    The $fullname is from elsewhere in my script.

    Any suggestions how to fix this? Or is the problem somewhere else?

Viewing 1 replies (of 1 total)
  • It looks like it should work. Check you have $wpdb as a global and that you’ve got the table name correct.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.