use strict; use warnings; use DBI; my $dbh = DBI->connect( 'DBI:mysql:test', 'foo', 'bar' ) or die; my $lon = -0.232323127347249; my $sql = qq| SELECT lon,lat,location_id FROM lat_long WHERE lon>= $lon|; my $sth = $dbh->prepare($sql); $sth->execute(); print STDERR "Rows not using placeholders ".$sth->rows."\n"; $sql = qq| SELECT lon,lat,location_id FROM lat_long WHERE lon >= ?|; $sth = $dbh->prepare($sql); $sth->execute($lon); print STDERR "Rows using placeholders ".$sth->rows."\n"; __END__