Answered
Prevent multiple edit sessions
I've built an ad campaign managing tool with Coldfusion and
mySQL which allows multiple users in diverse locations to monitor,
edit and communicate about ads which are scheduled for publication
as part of a campaign. Recently, it came to my attention (duh!)
that it is important to prevent multiple users from opening the
same ad for editing. I could use CFLOCK on my INSERT or SELECT
statements, but I think I might rather CFLOCATION to a page
explaining that another user already has the ad open for editing.
I've been pondering setting application scope variables whenever an
ad table row gets opened for editing, then testing for such
variable and delivering a message notifying the user that the
record is already being modified. Am I on the right track here? Or
am I missing something obvious?
I've contemplated the potential for a user to open an ad for edit, then never submit or otherwise close the session, but a timout on the application variable could handle that, couldn't it?
I've built numerous CMS and dynamic sites, but this is the first one with realistic potential for multiple simultaneous administrative connections. Any help is much appreciated.
max
I've contemplated the potential for a user to open an ad for edit, then never submit or otherwise close the session, but a timout on the application variable could handle that, couldn't it?
I've built numerous CMS and dynamic sites, but this is the first one with realistic potential for multiple simultaneous administrative connections. Any help is much appreciated.
max