the record deletion is the easy part.
your delete page will have a hidden element that is used to pass the ID of the record to delete, in your example, the value of the hidden element would be 50:
<input type="hidden" name="deleteID" id="deleteID" value="50" />
you would add two delete record behaviors.
the first for tableA, set the key column to ID and the value to use the deleteID hidden form element.
in the second delete behavior for tableB, set the key column to Thelink and for the value use the deleteID hidden element again.
the tougher part will be deleting the files. This will take a little bit of hand coding, but not to much.
First create a recordset to query tableB and filter the Thelink column using the deleteID form element.
This will return a recordset that contains all of the file names to delete.
Then add the delete file behavior, set the trigger to recordset recordsetName is not empty
Set the Delete folder to the folder that contains the images to delete.
for the file name, click the lightning bolt icon and select the Imagename column
the delete file code on the page will look similar to this:
<?php
$WA_DeleteFileResult1 = false;
if(($totalRows_recordsetName == 0)){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("imageFolder/", "".$row_recordsetName['Imagename'] ."");
}
?>
We need to add a loop around that code to loop through the recordset:
<?php do { ?>
<?php
$WA_DeleteFileResult1 = false;
if(($totalRows_recordsetName == 0)){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("imageFolder/", "".$row_recordsetName['Imagename'] ."");
}
?>
<?php } while ($row_recordsetName = mysql_fetch_assoc($recordsetName)); ?>