updateMemberData

Description

Updates the columns in the members table.

Syntax

void updateMemberData (mixed $members, array $data)



Parameter $members

Expected type: Mixed
Description: Either a single member ID or an array of member IDs, or NULL to update this for all members

Allowed types for $members
Allowed values Description
Integer The ID of the member we're updating this for
Null Indicates that this should be updated for all members
Array of Integers The IDs of the members we're updating this for (used when updating for two or more members)



Parameter $data

Expected type: Array
Description: An associative array with keys corresponding to column names and values corresponding to the new value for that column. The value can also be - to decrease the column value by 1, or + to increase the column value by 1


Notes

  • $members is either an integer or an array of integers corresponding to the member IDs of the members the info is being updated for.
  • Data is an associative array of the columns to be updated and their respective values.
  • Any string values updated should be quoted and slashed.
  • The value of any column can be '+' or '-', which mean 'increment' and decrement, respectively.
  • If the member's post number is updated, updates their post groups.
  • This function should be used whenever member data needs to be updated in place of an UPDATE query.
Advertisement: