# Last dataset via php to website

**URL:** <https://community.influxdata.com/t/last-dataset-via-php-to-website/28577>\
**Category:** Welcome & Getting Started\
**Tags:** influxdb, query, php\
**Created:** [February 13, 2023, 12:51pm UTC](https://community.influxdata.com/t/last-dataset-via-php-to-website/28577 "2023-02-13T12:51:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Testestestestestes](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@Testestestestestes](https://community.influxdata.com/u/Testestestestestes)\
**Post date:** [February 13, 2023, 12:51pm UTC](https://community.influxdata.com/t/last-dataset-via-php-to-website/28577/1 "2023-02-13T12:51:48Z")

</div>

Hi,

I have a little influxdb database where i am storing sensor data.  
I want to display the data in a website

For example. I am running a website with html, css, and php  
And i want to display the last (newest) dataset on the website.  
How do i do that with php? I know how i make it with a mysql db, but the syntax for influxdb is not the same.  
So could anyone help me out?

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [February 13, 2023, 1:11pm UTC](https://community.influxdata.com/t/last-dataset-via-php-to-website/28577/2 "2023-02-13T13:11:37Z")

</div>

A Google search for “PHP InfluxDB” suggested to me:

> **[GitHub - influxdata/influxdb-client-php: InfluxDB (v2+) Client Library for PHP](https://github.com/influxdata/influxdb-client-php)**
>
> InfluxDB (v2+) Client Library for PHP. Contribute to influxdata/influxdb-client-php development by creating an account on GitHub.

> **[Getting Started with PHP and InfluxDB](https://www.influxdata.com/blog/getting-started-php-influxdb/)**
>
> In this guide, learn how to set up InfluxDB with a PHP application, the fundamentals of connecting to the database, writing data, and more.

> **[Use the InfluxDB PHP client library | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/api-guide/client-libraries/php/)**
>
> Use the InfluxDB PHP client library to interact with InfluxDB.

(which refers back to the first link).

Regards,

Antony.

---

<div class="post-metadata">

**Author:** ![Testestestestestes](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@Testestestestestes](https://community.influxdata.com/u/Testestestestestes)\
**Post date:** [February 13, 2023, 1:42pm UTC](https://community.influxdata.com/t/last-dataset-via-php-to-website/28577/3 "2023-02-13T13:42:16Z")

</div>

Yeah i’ve also found this. But i do not understand it, its a little bit too heavy for me. I need a example from anyone.
