Skip to content

Update entries

Adrian Preuß edited this page Jan 10, 2018 · 1 revision
API.update(table, reference, parameters, callback);
Variable Default Type Description
table <MySQL-Table> String Your MySQL-Table
reference <MySQL-Column> String Reference of entry/row to update
data {} Object Some data there will be updated inclusive the reference
callback <Callback> Function Callback with the result

Results

The result of your Callback is the count of edited entries/rows.

Examples

API.update('yourTable', 'id', {
	id:		2, // This reference will be updated
	user_id:	98765
}, function onSuccess(count) {
	// Result
});