if multiple result sets are involved then res
is an array, specificy second result set
This commit is contained in:
parent
3b3a2f7b39
commit
31c6390617
2
index.js
2
index.js
@ -37,7 +37,7 @@ Postgres.connect();
|
|||||||
Postgres.FirstRow = function(inSQL, args, inResponse) {
|
Postgres.FirstRow = function(inSQL, args, inResponse) {
|
||||||
Postgres.query(inSQL, args, (err, res) => {
|
Postgres.query(inSQL, args, (err, res) => {
|
||||||
if (err === null) {
|
if (err === null) {
|
||||||
inResponse.json(res.rows[0]);
|
inResponse.json(res[1].rows[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(err.stack);
|
console.log(err.stack);
|
||||||
|
Loading…
Reference in New Issue
Block a user