PHP- XML for Google Map

Dear Experts,

I use google map to locate some of my customers.
I have below code, it works and list the data for the certain dates, but it does not work more than one month or different dates.
I checked the sql, it is fine.  Sql brings data but xml do not list it.

my date format is like this 2017-12-01

$mysqli->query("set names utf8mb4");

$sql = "SELECT * FROM mytable WHERE tarih >= '$birinci' AND tarih < date_add( '$ikinci' , interval 1 day) AND uid='$satisci' and lat is not Null";

$res = $mysqli->query($sql);

$xml = new XMLWriter();



while ($row = mysqli_fetch_assoc($res)) {

  $xml->writeAttribute('id', $row['id']);
  $xml->writeAttribute('name', $row['adi']);
  $xml->writeAttribute('address', $row['tarih']);
  $xml->writeAttribute('lat', $row['lat']);
  $xml->writeAttribute('lng', $row['lng']);
  $xml->writeAttribute('type', $row['bayikodu']);



header('Content-type: text/xml');

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Likely you'll have to provide some of your dataset + schema for someone to take a look at this.

Also, it's unclear what Google Maps has to do with looking up data by date range, so this may have confused people about your question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BRMarketingAuthor Commented:
Thank you David,

I find another solution. I'm now using another Google map api. Thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.