# Php and pgadmin

**URL:** <https://www.phphelp.com/t/php-and-pgadmin/30745>\
**Category:** General Database (Oracle, SQL Server, etc)\
**Created:** [January 5, 2020, 10:50am UTC](https://www.phphelp.com/t/php-and-pgadmin/30745 "2020-01-05T10:50:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rufaro](https://www.phphelp.com/user_avatar/www.phphelp.com/rufaro/32/2801_2.png) [@rufaro](https://www.phphelp.com/u/rufaro)\
**Post date:** [January 5, 2020, 10:50am UTC](https://www.phphelp.com/t/php-and-pgadmin/30745/1 "2020-01-05T10:50:25Z")

</div>

How can i create a search query in php which retrieves results as coordinates from postgresql and views the results as a map (google map or open street map)

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [January 6, 2020, 2:55pm UTC](https://www.phphelp.com/t/php-and-pgadmin/30745/2 "2020-01-06T14:55:33Z")

</div>

This is a very vague question. So, I will answer it the same way.

You write a sql query to get the data and return it to the frontend for the points to be created in google maps.

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [January 7, 2020, 2:11pm UTC](https://www.phphelp.com/t/php-and-pgadmin/30745/3 "2020-01-07T14:11:58Z")

</div>

ok, so you have postgres up and running with postgis?

php connects via pdo.

the queries will return WKT strings.

you can use them within the google javascript SDK, but lat/lon must be interchanged.
