A
|
acpan 1/2/2020 |
Try this:
|
M
|
mhollibush author 1/2/2020 |
Try this: >I have over 8000 old images in "thumb_med" column of a table >I created a new "new_pic" column in the table. >I would like to delete the data in the "thumb_med" when the "new_pic" is added. Before add event: // Make the thumb_med field empty when adding new_pic:
|
A
|
acpan 1/2/2020 |
> I don't want the "thumb_med" to be removed unless the "new_pic" is updated. |
M
|
mhollibush author 1/2/2020 |
> I don't want the "thumb_med" to be removed unless the "new_pic" is updated. Yes, valid concern. Before add events, check if the new_pic is added. We do this by checking if the new_pic field has any NEW data by checking its length: If (strlen($values["new_pic"]) > 0 ) { // Make the thumb_med field empty when adding new_pic: $values["thumb_med] = ""; } ACP
|
A
|
acpan 1/2/2020 |
Glad you find the rope. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=89774&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> |