Advertisement
Guest User

Untitled

a guest
Aug 6th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. //query
  2. $query = "SELECT DISTINCT toponimia, k_n_rua AS id, ST_AsGeoJson(ST_Transform(the_geom,900913)) AS GeoJson
  3.      FROM ruas
  4.      WHERE toponimia IS NOT NULL";
  5.                
  6. //execute query
  7.  $resultado = pg_query($conexao,$query);
  8.  
  9. //print
  10. print '{"rows" : ' . json_encode(array_values(pg_fetch_all($resultado))) . '}';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement