public static function delete_comments($file_id = 0) { if (is_numeric($file_id) && $file_id > 0) { $sql = "DELETE FROM `comments` WHERE `file_id` = " . database_essence::prepare($file_id); database_essence::query($sql); } }
public static function delete_file($file_id) { if (is_numeric($file_id)) { $sql = "DELETE FROM `files` WHERE `file_id` = " . database_essence::prepare($file_id) . " LIMIT 1"; database_essence::query($sql); } }