Jump to content

Recommended Posts

is it possable to get the script to update a database afther 5 mins cheers


example needs help theo cheers.

[code]

<?php

database connection

while loop assoc


$current_time = $row['curent_time'];

$time_change= $row['time_chage'];

$time_change = $current_time;

$time = $current_time - $time_change;

if($time ) {


header(" location: http://delete.php");
}

?>

[/code]
Link to comment
https://forums.phpfreaks.com/topic/11844-can-i-exec-update-via-time/
Share on other sites

[!--quoteo(post=383162:date=Jun 13 2006, 09:11 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 09:11 AM) [snapback]383162[/snapback][/div][div class=\'quotemain\'][!--quotec--]
you'd need a page open which would refresh itself after 5 minutes
[/quote]

so to get a header to work a [page must be open to work or anythink else useing a time idear.
add a field to the db as "pending delete" with a time of deletion, then add a function on each page load of the messaging service with deletes messages where time() > pending_delete && message_read = 1 or something similar. In any case it will not matter when the message is deleted because it will happen before the next page view in any case.
[!--quoteo(post=383174:date=Jun 13 2006, 09:43 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 09:43 AM) [snapback]383174[/snapback][/div][div class=\'quotemain\'][!--quotec--]
add a field to the db as "pending delete" with a time of deletion, then add a function on each page load of the messaging service with deletes messages where time() > pending_delete && message_read = 1 or something similar. In any case it will not matter when the message is deleted because it will happen before the next page view in any case.
[/quote]

Thank you so much you understood me so well cheers.

ps.You havent got any made php tutoral by your self online have you cheers.
[!--quoteo(post=383180:date=Jun 13 2006, 10:06 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 10:06 AM) [snapback]383180[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Well I'm actually at work :) ...though I spend 10% of my time here working :P
I don't know if I have time to write one right now.
[/quote]

Got that mate will do so ok.


Thank you for your help cheers.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.