Solution for CONCAT from two fields
is Given Below:
Wanting to CONCAT
two columns to make a new ID, as per the image.
The Trigger statement I have is: And I have tried Trigger INSERT and UPDATE events.
SET new.img_url_id = CONCAT(new.img_metadata_id, new.mag_name_id)
The Trigger statement returns values in the ‘mag_name_id’ field (10). The Trigger has to happen after field ‘img_metadata_id’ is inserted because ‘img_metadata_id’ is auto-incremented, and after ‘mag_name_id’ is inserted, it’s pulled from another table. Changing the Trigger time to After, PHPMyAdmin gives an error. Do I need to do a Procedure?
Thanks.