getting the error
bind message supplies 2 parameters, but prepared statement "" requires 0
when try to run postgresql query from nodejs app but same working in pgadmin
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.