Re: [PHP-DB] Flush database

2002-09-30 Thread wade
Could anyone help me to figure out how to write a piece of code that says if the time now time( ) is greater than 1 hour of the time( )then do something. I have a script that gets the time as of now and I also have the time of (lets say then) stored in a database. how would I write the code to sa

Re: [PHP-DB] Flush database

2002-09-27 Thread wade
Thank you, I think this will help me greatly. It was the mktime(function) that was throwing me for a loop. Thank you all for your help also! Micah Stevens wrote: > Using UNIX timestamps: > > if (time() - $timestamp > mktime(1,0,0,0,0,0)) { > // Difference it greater than one hour

Re: [PHP-DB] Flush database

2002-09-27 Thread Micah Stevens
Using UNIX timestamps: if (time() - $timestamp > mktime(1,0,0,0,0,0)) { // Difference it greater than one hour. Perform rejection code here } else { // Difference is one hour or less. Perform acception code here. } At 04:35 PM 9/27/2002 -0500, wade wrote: >So how w

[PHP-DB] Flush database

2002-09-27 Thread wade
So how would one compare the timestamp? how would you write if timestamp is greater than timestamp + 1 hour { Ok to view page run query to update that IP to new timestamp --> I think this will be better than a delete statement } else { Can't view page } I know you

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
ts. > > Good luck. > > Jim > > > > ---Original Message--- > > > > From: wade > > Date: Friday, September 27, 2002 02:02:50 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP-DB] Flush database > > > > I am storing IP addresses in

Re: [PHP-DB] Flush database

2002-09-27 Thread Jim Hunter
database hits. Good luck. Jim ---Original Message--- From: wade Date: Friday, September 27, 2002 02:02:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Flush database I am storing IP addresses in a database, but after an hour has passed I want to delete all the IP addresses

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
How about writting the IP address to the database with a timestamp, then when a matching IP address arrives you view the timestamp and if it has been more then a hour, they can view the page, which would force you to update the timestamp. Of course you would probably need to write a stand-alone (

Re: [PHP-DB] Flush database

2002-09-27 Thread Ignatius Reilly
t; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 27, 2002 10:53 PM Subject: [PHP-DB] Flush database > I am storing IP addresses in a database, but after an hour has passed I > want to delete all the IP addresses from that database. I want to do > this ba

[PHP-DB] Flush database

2002-09-27 Thread wade
I am storing IP addresses in a database, but after an hour has passed I want to delete all the IP addresses from that database. I want to do this based on the server time. Example.. Someone comes to my web page, I store their IP address in my database. So now I write a PHP script that says if that