This probably is for most SQL servers, but I am using on mySQL 5.x:
To clarify, I know there are many ways to achieve this, but in my case the following is what we need to happen:
Creating a trigger that when a record is inserted, it sets another field in the same row to have it's auto-incremented id as part of the value
I've come very close, trying a AFTER INSERT trigger, however you cannot do an UPDATE on the same table whose trigger is firing.
CREATE TRIGGER ai_SetURL AFTER INSERT ON tblEvent
FOR EACH ROW UPDATE tblEvent SET EventURL=CONCAT("whatever.php?event=",EventID)
Anyone know of a way to do this?
Merry Christmas!!!(You can believe what ever you like, feel free to not have one, but I can still wish it for you, its not "forcing it on you")