Fusio

API / sql.executeUpdate

Arguments
Name Type Description
sql string
params object
Return
Type Description
integer
Example
var sql = connector.get("sql-connection");
var body = request.getBody();

sql.executeUpdate("INSERT INTO acme_news SET title = :title, content = :content", {
  title: body.title,
  content: body.content
});

response.setStatusCode(201);
response.setBody({
  message: "Create successful!"
});