|
-
Aug 11th, 2013, 06:07 AM
#1
Thread Starter
Fanatic Member
Check timestamp is over 5 minutes ago?
Hi guys, does anybody know a way of only inserting the same thing into the database if they are 5 minutes apart? For example :
Jamie Warren listened to Capital FM - goes in at 12:06pm
but if i then if i refresh the page it adds the record again but with a different time stamp, is there a way to only add the same record if the timestamps are over 5 minutes apart?
$time = time();
$sql_insert1 = "INSERT into `activity`
(`username`,`activity`,`time`,`type`
)
VALUES
('$id','$text','$time','broadcast'
)
";
mysql_query($sql_insert1) or die("Insertion Failed:" . mysql_error());
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|