This content has been marked as final. Show 4 replies
for starters, just put an appropriate cfmail tag right after any delete
cfquery you want to keep an eye on - that will fire off every time the
delete query is executed
as for requesting page name - depends where your delete queries are: if
in cfc's you will probably have to pass in another argument with current
page's name into the cfc and then use it in the cfmail; if they are in
same cfm pages as the link/button to execute deletion, then use
cgi.script_name; if the delete query is in a separate cfm page (i.e.
delete_email.cfm), then try using cgi.http_referer instead (not sure
about this one if the delete is fired through form submission, though,
but will probably work, too...)
as alternative to email, consider using <cflog> tag....
yes but what i am looking for is a global solution, so is there a way of using the application page to send me an email if the delete function is used?
i am afraid there is no easy solution like that, if any at all...
technically, one probably (this is me just hypothesising here...) could
"under the hood" of cfquery tag and write some custom java which extends
it to do what you want.... but i guess this will also bee way too
rdbms-specific to implement on any wider scale...
but then again i may be wrong, and someone smarter than me is meanwhile
typing exactly the code you need...
What DBMS are you using?
Can you add a trigger to that table, in order to insert information on a log table on the delete event, and have a CF component read this log and send the mail to you?
Not really sure if this is what you're looking for ...