Deleting a station profile also deletes all its associated QSOs

这个提交包含在:
Peter Goodhall 2019-12-03 19:16:40 +00:00
父节点 a290fc5201
当前提交 81e8b51729
共有 2 个文件被更改,包括 6 次插入1 次删除

查看文件

@ -73,6 +73,11 @@ class Stations extends CI_Model {
// Clean ID
$clean_id = $this->security->xss_clean($id);
// Delete QSOs
$this->db->where('station_id', $id);
$this->db->delete($this->config->item('table_name'));
// Delete Station Profile
$this->db->delete('station_profile', array('station_id' => $clean_id));
}

查看文件

@ -70,7 +70,7 @@
<a href="<?php echo site_url('station/edit')."/".$row->station_id; ?>" class="btn btn-info btn-sm"><i class="fas fa-edit-alt"></i> Edit</a>
</td>
<td>
<a href="<?php echo site_url('station/delete')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete QSO <?php echo $row->station_profile_name; ?>?');"><i class="fas fa-trash-alt"></i> Delete</a></td>
<a href="<?php echo site_url('station/delete')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete station profile <?php echo $row->station_profile_name; ?> this will delete all QSOs within this station profile?');"><i class="fas fa-trash-alt"></i> Delete</a></td>
</tr>
<?php } ?>