SYNOPSIS

int MGOupdsubscription (Subscription *sub)

DESCRIPTION

The MGOupdsubscription() function updates an existing subscription record. Information is passed through sub. The required fields are:

sub.uwnetid is the uwnetid name. sub.subscription_code is the subscription reference code. sub.subscription_data is the subscription data. sub.permit is a boolean indicating whether the subscription is permitted. sub.permit_by is the validation id of the entity who authorized this permission. sub.permit_source is the validation source reference code. If you enable the permit boolean, you must also specify the permit_by and permit_source fields. sub.permit_exp is the expiration date of this subscription in YYYY-MM-DD form. The same applies to the sub.deny* fields. A deny overrides any permits. You should specify only one of the two. sub.notify_code indicates whether the uwnetid has been notified that the subscription is to expire. sub.notify_date is the date of expiration. sub.status_code is the subscription status reference code. You can only change the subscription_data, permit*, deny*, notify*, and status_code fields. To change the other fields, you must insert a new record.

RETURN VALUE

Returns the number of records updated upon success or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately).

ERRORS

AUTHENTICATION LEVEL

wmango

SEE ALSO

MGOdelsubscription(), MGOinssubscription(), MGOselrsubscription(), MGOselrvalsource(), MGOselsubscription(), MGOselrsubstatus(), MGOzero()