Simon icon Simon
Flexible server monitoring

Updating Records in MySQL DB

Hello, hope you can help.

I am looking to use the MySQL Notifier to update records in a MySQL database when a Service fails. At the moment I am testing this using the File is Writeable service which is working fine.

Using the example "INSERT INTO sites (id) VALUES ("1")" syntax I am able to create new records in the table, however I would like to update existing records with a new field value instead.

I have tried using the following code which works in phpMyAdmin, but doesn't work through Simon :-

UPDATE sites SET id="2" WHERE id="1"

Could you help? Thanks.

Tom

Re: Updating Records in MySQL DB

Hi, I've fixed this issue after some more testing.

Correct code should be :-

UPDATE sites SET id="2" WHERE id=1

(Minus the final quotes)

Thanks,
Tom