Hi everybody! I have this snippet where I’m able to view a custom table, however is any way I can delete rows if I want to from the front view? or add a delete text on each row?
<?php
$output = '';
$result = $modx->db->query( 'SELECT * FROM `modx_intranet_cargas` ORDER BY position ASC, location ASC' );
while( $row = $modx->db->getRow( $result ) ) {
$output .= '<tr><td>' . $row['position'] . '</td><td>' . $row['location'] . '</td><td>' . $row['ftpt'] . '</td><td>' . $row['contactperson'] . '</td><td>' . $row['phone']
. '</td></tr>';
}
$output .= '</table>';
return $output;
?>