I am trying to select places from my postgis db that are within a specific bounding box. I am trying to accomplish this with this query:
//latlong - latitude, longitude of a place
SELECT * FROM places WHERE St_Contains(St_GeomFromText('Polygon((:top_left_long :top_left_lat, :bottom_right_long :bottom_right_lat))'), latlong);
First of all, I get the following error:
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: :top_left_lat
What does it mean? And the second problem - am I feeding these parameters correctly? I mean first longitude, then latitude?
source
share