The com_num is used by Siteadmin to inform you of how many comments a video has.
If a video has 10 comments and you delete one of them via the Siteadmin panel then it will still show the video as having 10 comments, when in fact, it should be only 9.
Here is how to fix this problem.
$sql = "DELETE FROM video_comments WHERE CID = '" .mysql_real_escape_string($COMID). "' LIMIT 1";
Add this below.....
$sql = "UPDATE video SET com_num = com_num-1 WHERE VID = " .$VID. " LIMIT 1";
This will now update the com_num field in the database when the administrator deletes a video from the Siteadmin panel and the correct number of remaining comments will be displayed.
Edited by theone, 03 February 2013 - 03:10 AM.