Skip to content

Commit

Permalink
fix: zip cols
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Apr 20, 2024
1 parent eaf8f7e commit 00f0db7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/utils/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 00f0db7

Please sign in to comment.