Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titlepjs.query()
pjs.query("select * from mytable where mycol = ? or mycol = ?", [value1, value2]); // Query runs against default database connection.
pjs.query(pjs.getDB("crm"), "select * from mytable where mycol = ? or mycol = ?", [value1, value2]); // Query runs against database connection "crm".


Code Block
languagejs
titleData API
var record = {
  id: 123,
  firstname: "Joe",
  lastname: "Customer"
};
  
pjs.data.add("customers", record); // Runs against default database connection
pjs.data.add(pjs.getDB("crm"), "customers", record) // Runs against database connection "crm"