Use this instead

SELECT user_ip  FROM clinic_log  WHERE user_ip = '$pw_userIP' AND
clinic_log.log_time + interval 300 second >= Now();

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company

----- Original Message -----
From: "p.whiter" <[EMAIL PROTECTED]>
Sent: Thursday, October 18, 2001 5:41 AM
Subject: [PHP-DB] newbie - problems with Select and timestamp(14)

> Hi
> I am trying to set-up a type of anti-flood block on one of my forms, the
> I am doing this is that when the first submission is made I log various
> details into a user_log table including IP no and a Timestamp (14) column
> called log_time. Now if the button is clicked again the php script will
> the following query:
> SELECT user_ip  FROM clinic_log  WHERE user_ip = '$pw_userIP' AND
> (((NOW()+0) - clinic_log.log_time ) < 300)
> What I am (trying) doing here is to check the users IP ($pw_userIP)
> the user_ip column in the database and if it matches then check to see
> whether it has been there for less than 300 seconds.
> I have just spent the last couple of hours trying to get this
> doesn't want to know. It keeps finding the matching IP and
> disregarding the time calculation......
> Thanks for any help.
> Paul

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to