Jump to content


Photo

can i exec update via time


  • Please log in to reply
8 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 June 2006 - 08:54 AM

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


example needs help theo cheers.


<?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");
}

?>


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 13 June 2006 - 09:11 AM

you'd need a page open which would refresh itself after 5 minutes
z..z..z..z..z..z..z..z..

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 June 2006 - 09:13 AM

[!--quoteo(post=383162:date=Jun 13 2006, 09:11 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 09:11 AM) View Post[/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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 13 June 2006 - 09:15 AM

you'll need the page open to run the php script or have some other page open it. You could get a javascript page to load the page after 5 minutes and run the query on the load of the page.
z..z..z..z..z..z..z..z..

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 June 2006 - 09:24 AM

from your point of view and cheers how to get throw this task of mine.

A user reads there message and the database gets a saved copy in a field then 5 mins later the message the message read is deleted.


Does it sound possable cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 13 June 2006 - 09:43 AM

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.
z..z..z..z..z..z..z..z..

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 June 2006 - 09:55 AM

[!--quoteo(post=383174:date=Jun 13 2006, 09:43 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 09:43 AM) View Post[/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.

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#8 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 13 June 2006 - 10:06 AM

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.
z..z..z..z..z..z..z..z..

#9 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 13 June 2006 - 10:12 AM

[!--quoteo(post=383180:date=Jun 13 2006, 10:06 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 10:06 AM) View Post[/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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users