Answer the question
In order to leave comments, you need to log in
How to connect YandexMaps, PHP and MySQL?
Hello! There is such a task: there is a MySQL database (car number, address, date and time), and you need to build marks on the map based on this data. So that the result is like on the test map .
I am not a programmer myself, but I wrote something. I looked at examples from the sandbox, found multiple geocoding. Wrote the following code to add points to the map:
<?php
while (($result = mysql_fetch_array($address)))
{
print_r (".add(ymaps.geocode('$result[0]',{results:1}))\n");
}
?>
var balloons = [<?php $myrow = mysql_query("SELECT cartime FROM data WHERE fio='$fio' AND carmodel='$carmodel' AND cardate='$cardate'"); while (($myrowresult = mysql_fetch_array($myrow))) { print_r ("'$myrowresult[0]', "); } ?>], i = 0;
var objects = ymaps.geoQuery(ymaps.geocode('Москва, Слесарный переулок, д.3'))
Answer the question
In order to leave comments, you need to log in
If you work with one of the well-known CMS, then there are some plugins for working with Yandex.Maps.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question