upload data

hello everyone ..
i have a problem ..
thats i trying to upload the digital output status to the sql or upload the relay status to the sql

i have read many topic talking about it ..
but i couldn't understand them ..
i mean what is the query statment in arduino programing ..
i dont wanna use php html to send data ..
ill use them to show the data ..
lets say i have something like this on my arduino software ..

int led1 = 8;
void setup()
{
     pinMode(led1,OUTPUT);
}
void loop()
{
     digitalWrite(led1,HIGH);
     delay(1000);

     digitalWrite(led1,LOW);
     delay(1000);
}

how can i upload the sql table everytime the output change the status from high to low ..
like how can i write query like 'insert into tablename valuse anything'
and how can i write the connect statment like i use in php

$con = new pdo("mysql:host='localhost' dbname='databasename'",'user','pass');
or 
mysql_connect(localhost,user,pass);
mysql_select_db(databasename);

what i understod that first thing i have to do is give the arduino uno ethernet shild tcp/ip data like this

#include <SPI.h>
#include <Ethernet.h>

// network configuration. dns server, gateway and subnet are optional.

// the media access control (ethernet hardware) address for the shield:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// the dns server ip
IPAddress dnServer(192, 168, 1, 1);
// the router's gateway address:
IPAddress gateway(192, 168, 1, 1);
// the subnet:
IPAddress subnet(255, 255, 255, 0);

//the IP address is dependent on your network
IPAddress ip(192, 168, 1, 177);
int led = 9;
int led1 = 8;
void setup() {
pinMode(led,OUTPUT);
pinMode(led1,OUTPUT);
Serial.begin(9600);

// initialize the ethernet device
Ethernet.begin(mac, ip, dnServer, gateway, subnet);
//print out the IP address
Serial.print("IP = ");
Serial.println(Ethernet.localIP());
}

void loop() {
digitalWrite(led,HIGH);
delay(100);
digitalWrite(led1,HIGH);
delay(100);

digitalWrite(led,LOW);
delay(100);
digitalWrite(led1,LOW);
delay(100);

}

when i uploaded this code to the arduino i succeded pinging on the ip 192.168.1.177 via lan network

so anyone can help me to upload the output via sql please ..

my arduino is arduino uno ethernet shild

uppppp

how can i upload the sql table everytime the output change the status from high to low ..

What SQL table? I don't understand the question. I doubt anyone else does either.

Presumably the SQL database is on your PC and you will need a program running on your PC to receive the data from the Arduino and store it in the database.

...R

thanks for replaying ..

i mean the query ill make ..
like in void loop ill use something like this ..

void loop()

{
if(digitaloutput == HIGH)
mysql_query(insert into tablename valuse 1);
}

what i need sir the mysql how to connect through arduino and how can i put an query in the programing ..
i hope its clear for you now ..

Robin2:
Presumably the SQL database is on your PC and you will need a program running on your PC to receive the data from the Arduino and store it in the database.

...R

yes thats what i want .

up

pulldozer:
yes thats what i want .

I think the reason you are not getting answers is because (as you have admitted) your problem is a PC programming problem not an Arduino programming problem.

...R