pg_exec error

Ethan Alpert ealpert at DIGITALGLOBE.COM
Fri Jun 10 14:14:55 EDT 2005


Sorry this is PHP right?

Read up on the differences between "'s and ''s.

You want the string you produce to look like:

GeometryFromText('POINT(<number> <number>)',<srid>);

In your case I don't think that's what you're getting you need to join
the strings. PHP use . Doesn't it?

-e

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Randy James
Sent: Friday, June 10, 2005 11:33 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] pg_exec error


Hi
I am having trouble with inserting a veriable with the GeometryFromText
function, this the line that causes an error;

pg_exec($connection, "INSERT INTO sites VALUES
('$q_nxt_gid','$id','$label','$site_id','$comments',GeometryFromText('PO
INT('$pointx'
'$pointy')',-1)");

It produces this error, (Note; 575618 is the $pointx variable).

Warning: pg_exec(): Query failed: ERROR: syntax error at or near
"575618" at character 88 in
/var/www/html/gis/create/write_postgres.phtml on line 19

Thanks for any help i can get.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the mapserver-users mailing list