how to delet the coments while clearing data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to delet the coments while clearing data

    how to delet the coments on a fporm post or say a shout ... where the commests are saved in difrent sql
    normaly clear data pr deleting the old post is done as taking there post time like this
    PHP Code:
    $altm time()-(5*24*60*60);

    echo 
    "<br/>";

    $res mysql_query("DELETE FROM shout WHERE shtime<'".$altm."'");

    if(
    $res){

    echo 
    "<img src=\"images/ok.gif\" alt=\"O\"/>Shouts Older Than 5 days were deleted";

    }else{

    echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error!";


    but in this the comment on shout or any outher post is not deleted

    when the comment is saved in another table say shoutcomment .....

    can any one plzz give a hint how to make it done

    #2
    First select data by some criteria (poster id or something) and than do while loop with deleting on selected.
    That is just to delete from some past time.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment

    Working...
    X