title: Which is the best way to work with PostGIS and OpenLayers?
body: <p>I have a postgresql db table with a City table that has a geography field with the city coordinates.</p>
  
  <p>I have made a php page that loops through these records, converts geo field in latit/longit and draws a  marker in an OpenLayers map to the city during an ajax call.</p>
  
  <p>I don't know if this is the correct way to do it: is there a way to directly bind the sql query to the map without having to loop? 
  Is there a more direct relation between the database and the OpenLayers maps?</p>