On Thu, 2003-08-21 at 22:23, John Taylor-Johnston wrote:
> Not teasing, I know I could do this with some ready made script, but I want to make 
> my own.
> 
> I'm making a counter.
> 
> CREATE TABLE `counter` (
>   `IPAddress` VARCHAR NOT NULL ,
>   `RemoteHost` VARCHAR NOT NULL ,
>   `TimeStamp` TIMESTAMP NOT NULL,

try not naming your timestamp column a reserved word...  just a guess

>   `Date` VARCHAR NOT NULL
> )
> 
> 
> Question 1, how do I create a timestamp, (My SQL above does not work.), if this is 
> indeed what I want to do.

see above

> Question 2, how can I read TimeStamp and if the elapsed time between visits is more 
> than 60 minutes, I insert a new record?

umm... look at:

http://us4.php.net/time
and
http://www.mysql.com/doc/en/DATETIME.html

one thing to look out for is php and mysql deal with time in different
ways, so you may have to do some conversion... but this should get you
started. 

> Where do I start?

the above 2 links.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to