How to add value in column using update_user() function?

Discussion in 'Integration' started by smitssmiling, Feb 5, 2011.

  1. smitssmiling

    smitssmiling New Member

    Joined:
    Feb 5, 2011
    Messages:
    1
    Hi all,
    I added new column in pre-existing mysql table and wanted it to update by using php script. I am trying to add value using update_user() function. But its not getting updated. Can anyone please suggest me which things which are necessary to be done or any variables to be set before using this function? Please help.....:confused: Thank you.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You should add your field from amember CP -> Add fields with type set to SQL, then you can update it:
    PHP:
    $u $db->get_user($member_id);
    $u[fieldname] = "value";
    $db->update_user($member_id$u);

Share This Page