Skip to content

Insert entries

Adrian Preuß edited this page Jan 10, 2018 · 1 revision
API.insert(table, parameters, callback);
Variable Default Type Description
table <MySQL-Table> String Your MySQL-Table
parameters {} Object Some data for the new row/entrie
callback <Callback> Function Callback with the result

Results

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

Examples

API.remove('yourTable', {
	id:		null,
	user_id:	1337,
	number:		999,
	time_created:	'NOW()'
}, function onSuccess(count) {
	// Result
});