Romain Billoir writes:
> Hi, i'm trying to request a database using data type "point" using keyword
> "IN" with a list of point generated by PHP, like this:
> 'SELECT * FROM map WHERE position IN ((point(-1,-1), (point(1,-1),
> point(1,1), point(-1,1))'
> but this request returns me an error: oper
Hi Romain,
Assuming you have PostGIS installed and position is defined as a point or
multpoint ADT then you could use the ST_Intersect operator
SELECT *
FROM map
WHERE ST_Intersects(position, 'MULTIPOINT(-1 -1,1 -1,1 1,-1 1)');
Regards
Andrew
On 2010-09-26, at 12:27 PM, Romain Billoir wrote:
Hi, i'm trying to request a database using data type "point" using keyword
"IN" with a list of point generated by PHP, like this:
'SELECT * FROM map WHERE position IN ((point(-1,-1), (point(1,-1),
point(1,1), point(-1,1))'
but this request returns me an error: operator doesn't exist point = point.