Author Topic: ESP8266 GET data from SLQ database  (Read 1348 times)

0 Members and 1 Guest are viewing this topic.

Offline qwertisTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
ESP8266 GET data from SLQ database
« on: June 02, 2019, 04:35:00 pm »
Hello,

I would like to read data from a SQL database (strings) however I could not find a good example on the internet.

The project is a led matrix ticker where people can go to a website where they can update the displayed text. The website contains of a php script that puts data in a sql database.

Now I would like to let my wemos D1 (ES8266) (or Particle Photon ) to GET this data.

On the internet I only found these two "tutorials" but they do not work for me. It seems that both are for local use (?). There exists a lot of tutorials for writing so i'm doubting if it is even possible.
http://ice786pk.com/?p=662 
http://afterhoursengineering.net/blog/blog/2015/04/11/esp8266-read-and-write-data-to-a-database/

I'm not that experienced with coding hardware. So If you could point me to a step by step guide that would be awesome!  :)

Thank you in advance,
Mark
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: ESP8266 GET data from SLQ database
« Reply #1 on: June 03, 2019, 05:31:46 am »
I would consider putting a simple (REST) interface in front of it in order to simplify the code you need to write on the ESP...
It could be as simple as a GET on an url that delivers you the data (ranges on the query string?).
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Online kripton2035

  • Super Contributor
  • ***
  • Posts: 2587
  • Country: fr
    • kripton2035 schematics repository
Re: ESP8266 GET data from SLQ database
« Reply #2 on: June 03, 2019, 05:43:55 am »
here is an arduino example for postgresql. did not try it for now, but I'm planning to !
https://github.com/ethanak/SimplePgSQL
 

Offline qwertisTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: ESP8266 GET data from SLQ database
« Reply #3 on: June 03, 2019, 11:59:00 am »
Could you give an example or point to a tutorial? :)
Thank you!  :-+
 

Offline qwertisTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: ESP8266 GET data from SLQ database
« Reply #4 on: June 03, 2019, 12:01:21 pm »
Sadly I could not get it working, but thanks for your input.
Please tell if you get it to work! :)
 

Offline mskeete

  • Contributor
  • Posts: 33
  • Country: gb
Re: ESP8266 GET data from SLQ database
« Reply #5 on: June 03, 2019, 12:14:50 pm »
Sadly I could not get it working, but thanks for your input.
Please tell if you get it to work! :)

How far did you get?
Did you write a second web page to return data in a simple format based on a query string?

Error messages and or code that tried that isn't working?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf