I want to create a log file on insert, update, delete. I don't want call log function every time when i'm inserting, updating or deleting record. Is there any short method?
Yes, Write your own database class. - save queries into an array - create a exit(unload) function that write/append your array to a file.
Thanks for reply my friend. My Teacher Told Me About PHP Triggers, That Triggers Can Play Action On "Insert", "Delete", Update" Events. But I Don't Know How To Use PHP TRIGGERS?
Thanks For Your Replies Once Again, I've Created My First TRIGGER I'm So Happy, Thank a lot Friends. I've Now One More Question DROP TRIGGER IF EXISTS `catch_insert`// CREATE TRIGGER `catch_insert` BEFORE INSERT ON `books` FOR EACH ROW BEGIN INSERT INTO testing.trigger (id, email, password) values ('1', 'abc@abc.com', 'pass'); END // Code (markup): This Is Working Perfect On Every Time When Ever New Record INSERTS. I Just Want To Create a Log File Using Trigger To Do Same Thing. I Don't Want To Create Records On Database. So Please Guide.
I think this will helpful to you: itewbm.tistory.com/entry/Save-MySQL-query-result-in-text-file-or-CSV