From 00f0db7a912b652d2d4ac393b544374040f58a2a Mon Sep 17 00:00:00 2001 From: pjsier Date: Sat, 20 Apr 2024 14:34:42 -0400 Subject: [PATCH] fix: zip cols --- server/utils/queries.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/utils/queries.js b/server/utils/queries.js index e91c992..c84d33b 100644 --- a/server/utils/queries.js +++ b/server/utils/queries.js @@ -111,10 +111,10 @@ async function queryPGDB({ if (ownid && code) { query.append( - `WHERE p.own_id LIKE ${ownIdMatch} AND p.propzip LIKE ${zipMatch}` + `WHERE p.own_id LIKE ${ownIdMatch} AND p.zipcode_sj LIKE ${zipMatch}` ) } else if (code) { - query.append(`WHERE p.propzip LIKE ${zipMatch}`) + query.append(`WHERE p.zipcode_sj LIKE ${zipMatch}`) } else if (ownid) { query.append(`WHERE p.own_id LIKE ${ownIdMatch}`) } else if (coordinates) { @@ -416,7 +416,7 @@ async function queryPGDB({ console.error(`Unknown SQL query type: ${PGDBQueryType}`) break } - console.log(`DB Query: ${query.strings.join("")}`) + console.log(`DB Query: ${query.text}`) const { rows } = await db.query(query) return { data: rows } } catch (err) {