Conditional Update - Only update certain field if another field has been changed
This post is related to a recent post here:
I am working on a permalink solution for my webassist based sites, and I have two database fields in a table:
I have the insert.php page working great (thanks to Jason's previous help). The careerPermalink is based off the careerTitle field and increments (-1, or -2) if the title is already present by doing an occurrence count via a recordset.
On the update.php page, I would like the careerPermalink database field to only update (and do the increment) if the careerTitle database field has changed. Is there a way to perform a check (if careerTitle is being changed) and then update the careerPermalink and do the increment if needed?
Attached is my existing code.