Pages: [1]   Go Down
Author Topic: Reading from Mysql  (Read 221 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all

Heres my problem, ive got a few ethernet boards connected in different locations, all they do is send a get command to a server.
I need to be able to configuer them all remotly, so that i can change the server that they connect too and the get data they print once connected.
The best way i can think to do this would be via MYSQL, after searching for ages i found lots of tutorials on how to add data to a DB but none on how to query?
So i think if each device had an ID number that was in a field in the DB to query then possibly i could then get the data back to it.
Most of the tutorials suggested using PHP to work between the two when updating the DB is it possibe to do the same with a query?

Or mabe theres a really simple way of doing this and im missing it?

Thanks for your time!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13044
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I need to be able to configuer them all remotly, so that i can change the server that they connect too and the get data they print once connected.

I could be mistaken but I believe that's the purpose of DHCP and domain names.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I probably explained that badly so say origianly i use the device 1 to connect to www.google.com and get .... something from that page. then i need to be able to change www.google.com to www.somethingelse.com.
So in my DB i would cange   | 1 | www.google.com | too   | 1 |  www.somethigelse.com |
also the device would only need to poll for the new settings once it has been restarted so can all be done in the setup.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 644
Posts: 50524
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The best way i can think to do this would be via MYSQL, after searching for ages i found lots of tutorials on how to add data to a DB but none on how to query?
The Arduino isn't going to query your MySQL database. It is going to execute a script on the server. That script might be written to query a MySQL database.

But, that isn't an Arduino issue. It's a PHP issue, and there are plenty of examples around of using PHP to query a MySQL database.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok thanks now i no php can do it i know where to look

Thanks
Logged

Pages: [1]   Go Up
Jump to: