Пример
[code]
<?php
#вывод
$message = mysql_query("SELECT * FROM `message` WHERE user_to = '$AC_ID' and `del` != 'on' ORDER BY `id` DESC LIMIT 5"
;
#при удалении
mysql_query("UPDATE `message` SET `del` = 'on' WHERE `id` = '".abs(intval($_GET[id]))."' LIMIT 1"
;
?>
[/code]