how to delet the coments while clearing data

Started on the old forum in June 2012 · view the original in the archive · old links redirect here

1 reply · 422 views · started 14 years ago · 1 min read

2 participants
love_444 Junior · 38 posts #1

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

$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

skils are gained by practis http://myguruworld.com/

arnage Lead · 811 posts #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***

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close