简体   繁体   中英

getting bind message supplies 2 parameters, but prepared statement “” requires 0 error when try to run postgresql query from nodejs app

getting bind message supplies 2 parameters, but prepared statement "" requires 0 error when try to run postgresql query from nodejs app but same working in pg admin

Below mentioned query I am trying to run:

query="select array_agg(zonename) from bitargetstg.tax_program_zones where coalesce(SHAPE_Area,0) >0 and (ST_Contains(ST_GeomFromEWKT(Geometry),"+

"ST_GeomFromText('POINT($1 $2)')) or ST_intersects(ST_GeomFromEWKT(Geometry), ST_GeomFromText('POINT($1 $2)')))";

There is no parameter substitution in a string literal, so $1 and $2 are taken literally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM