...
Code Block | ||||
---|---|---|---|---|
| ||||
let name = "Acme Corporation"; let address = "123 Main St."; let row = pjs.query("select * from new table(insert into customer(name, address) values(?, ?))", [name, address]); |
Or:
Code Block | ||||
---|---|---|---|---|
| ||||
pjs.define("name", { type: "varchar", length: 20 }); pjs.define("address", { type: "varchar", length: 20 }); name = "Acme Corporation"; address = "123 Main St."; let row; let stmt = pjs.prepare("select * from new table(insert into customer(name, address) values(?, ?))"); if (sqlcode === 0) { pjs.bindParameters(stmt, [[name, SQL_PARAM_INPUT], [address, SQL_PARAM_INPUT]]); } if (sqlcode === 0) { pjs.execute(stmt); } if (sqlcode === 0) { row = pjs.fetch(stmt); } |
...