D
D
delkov2016-07-04 21:01:38
css
delkov, 2016-07-04 21:01:38

[Maps] Sending SQL via JS/PHP?

Good day.
There is Yandex map / Leaflet.
There is a DB like time -> array[];
Task: depending on time, draw an array[] array by accessing the database.
The database is PostgreSQL (or MySQL?).
Tell me how this can be done, purely in JS - read unsafe, PHP then?
or is there something better?
Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
Bodarev, 2015-12-27
@Bodarev

habrahabr.ru/post/126207

.square {
  width: 100px;
  height: 0;
  border-top: 100px solid red; 
  border-right: 40px solid transparent;
}

D
Dmitry, 2015-12-27
@soledar10

as an option
https://jsfiddle.net/soledar10/f5atuf66/

T
trushka, 2015-12-28
@trushka

So the gradient!)
https://jsfiddle.net/trushka/0s9bs3r5/

T
ThunderCat, 2016-07-04
@ThunderCat

There is a DB like time -> array[];
Shta??????????? Maybe this kind of data?
draw array[] by accessing the database
Where are we drawing?
The database is PostgreSQL (or MySQL?)
so there is a database or is it still being considered ???
Tell me how this can be done, purely in JS - I read it unsafely
If you mean JS on the user's page - not so much unsafe as unrealistic, data exchange with the database is carried out on the server side, between the server script and the database.
UPD: See working with ajax, send a request to a script on the server, get a json array from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question