Page 1 of 1
QUESTION -Checking whether my MySQL datbase has been updated
Posted: Thu May 19, 2005 3:49 am
by mhouldridge
Hi,
I would like to create a PHP script that checks my Mysql datbase for any changes, i.e. whether someone has added a record, deleted a record etc ?
thank you,
Mark
Posted: Thu May 19, 2005 3:55 am
by phpScott
silly thought, but wouldn't you know when some makes a change to the db via your php scripts already?
Posted: Thu May 19, 2005 3:58 am
by mhouldridge
Ur...
I have hundreds of records and I need to create an auto-send email that informs me of this. I do not know when a new one is created, or deleted.
Posted: Thu May 19, 2005 4:13 am
by mhouldridge
Just realised that I am stupid.
PLEASE IGNORE MY IDIOT QUESTION - its early in the morning and my head is screwed.
Posted: Thu May 19, 2005 4:15 am
by phpScott
if you want an email every time then you could check out
http://www.php.net/function.mail and build a simple emailer to let you know when someone inserts, updates, or deletes something in the db as part of the script that does the inserting, updating or deleting.
What I meant was that your script should check to make sure that any sql query is succesful and if it is then send yourself an email.