in reply to Capturing warnings from DBD:PG
$dbh->quote($post_id) . "," .
A side point, if you don't mind: The code uses dynamic SQL. Instead of building the statement on the fly, please use placeholders instead. That is, something like:
my $cmd = "insert into latlong (post_id,some_text,geom) VALUES (?, ?, +?);" my $query_handle = $dbh->prepare($cmd); $query_handle->execute($post_id, $some_text, "ST_GeomFromText('POINT($ +LongDEC $LatDEC)', 4326)");
Using placeholders tends to be safer, more clear, and does not (usually) require special quoting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing warnings from DBD:PG
by HeadScratcher (Novice) on Nov 26, 2015 at 10:31 UTC | |
by Pope-O-Matik (Pilgrim) on Nov 29, 2015 at 14:11 UTC |