result.rows[0]

This commit is contained in:
CHIEFSOFT\ameye
2024-10-31 14:04:09 -04:00
parent 1cef2e4884
commit d7df8d1b5b
+1 -1
View File
@@ -50,7 +50,7 @@ var cards = {
await db.query(Qstring, async function (err, result) { await db.query(Qstring, async function (err, result) {
try { try {
if (err) throw err; if (err) throw err;
if ( result.rows[0].stripe_cardholder_id !=='') if (result.rows[0].length > 0 && result.rows[0].stripe_cardholder_id !=='')
{ {
Qstring = " UPDATE members_card_request " + Qstring = " UPDATE members_card_request " +
" SET card_issue_id='"+result.rows[0].stripe_cardholder_id+"' , status = "+CARD_HOLDER_CREATED+", updated = now() " + " SET card_issue_id='"+result.rows[0].stripe_cardholder_id+"' , status = "+CARD_HOLDER_CREATED+", updated = now() " +