I have free web host with mysql database. I have one table of that database which has 3 fields.
id ----device_name----status
1------LED Light---------1
2------FAN----------------0
I want if mysql db table status field is "1" where id is 1 then set the switch status on and if the status field "0" then set the switch status off.