Odhiambo Washington wrote:

>Hello gurus,
>
>
>Please help. Where is my mistake?
>
>
>
>I get the following error...
>
>MYSQL: query failed: You have an error in your SQL syntax near ') < rei_ts' at line 1
>
>
>When I run the query below ....
>
>
>   SELECT rei_ip \
>   FROM relay_ip \
>   WHERE rei_ip="${sender_host_address}" AND DATE_SUB(NOW(), INTERVAL 10) < rei_ts
>
>  
>

...INTERVAL 10 day) < rei_ts

missing the unit of the interval...

>
>
>And the tabledesign is ...
>
>
>
>CREATE TABLE relay_ip (
>  rei_aid int(11) NOT NULL auto_increment,
>  rei_uname varchar(30) NOT NULL default '',
>  rei_domain varchar(128) NOT NULL default '',
>  rei_ip varchar(64) NOT NULL default '',
>  rei_ts datetime NOT NULL default '0000-00-00 00:00:00',
>  PRIMARY KEY  (rei_aid),
>  KEY rei_ip (rei_ip)
>) ;
>
>
>
>
>-Wash
>
>  
>

-- 
Ralf Narozny
SPLENDID Internet GmbH & Co KG
Skandinaviendamm 212, 24109 Kiel, Germany
fon: +49 431 660 97 0, fax: +49 431 660 97 20
mailto:[EMAIL PROTECTED], http://www.splendid.de




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to