I am trying to pull data from a database and then map it using Leaflet. My hunch is that directly querying my database with Javascript isn't a good idea (because I found another stackoverflow answer that said "that isn't a good idea), but I'm not sure what a good alternative might be.
I'm extremely new to Javascript (and Leaflet) and moderately capable with SQL. I do know some PHP and XML if I need to make some intermediate querying page (and then Leaflet grabs that info...?)