mysql and php time diffrence deletes

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Sideclef
Forum Newbie
Posts: 10
Joined: Tue Sep 16, 2008 1:38 pm

mysql and php time diffrence deletes

Post by Sideclef »

I have have looked all around for an answer for this and and haven,t found much on it...I am not that great in mysql...only the basics really...I want to delete all fields where the time difference is 5 minutes from the last update...I am inserting the update with php time()...I honestly have no idea how to go about it....any help would be appreciated...

this is how I have it written but it done work

Code: Select all

$killtime=(time() - 299); 
$up="DELETE FROM table WHERE time=time < '$killtime'";  
Sideclef
Forum Newbie
Posts: 10
Joined: Tue Sep 16, 2008 1:38 pm

Re: mysql and php time diffrence deletes

Post by Sideclef »

Never mind I swear I am not that retarded big big overlook on my part...
Post Reply