How to post data in mysql


#1

Hi, im working on a project and i need to post data from my photon to mysql db. I dont want to use any weebhook, i want to do it directly, using php or any stuff. But i dont find something that can help me (im newbie).

All help will be appreciated.

Im using this basic code that is getting analog values in real time.

int photoresistor = A0;
int power = A5;
int analogvalue;

void setup() {
pinMode(photoresistor,INPUT);
pinMode(power,OUTPUT);
Particle.variable(“analogvalue”, &analogvalue, INT);
}
void loop() {
analogvalue = analogRead(photoresistor);
delay(100);
Particle.publish(“upluz”, String(analogvalue));
delay(1000);
}


#2

There are other threads that deal with similar demands - try the search feature