[ale] mysql sql question
Chuck Payne
terrorpup at gmail.com
Fri Dec 17 00:21:14 EST 2010
I need to ask anyone that is good with sql,
I have this table where I entrying in some data, what like to know is
what has been entry in the last hour
desc fyre.ips;
+---------+--------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+------------+----------------+
| id | int(4) | NO | PRI | NULL | auto_increment |
| ip | varchar(16) | NO | UNI | | |
| date | date | NO | | 0000-00-00 | |
| time | time | NO | | 00:00:00 | |
| country | varchar(255) | NO | | | |
| code | varchar(255) | NO | | | |
| city | varchar(255) | NO | | | |
| guessed | varchar(255) | NO | | | |
+---------+--------------+------+-----+------------+----------------+
I am trying this sql statment, but I am getting nothing...
select * from fyre.ips where date = "2010-12-17" and time >=
TIME(now() - INTERVAL 1 HOUR);
Is sql right? If not what am I doing wrong
--
-----------------------------------------
Discover it! Enjoy it! Share it! openSUSE Linux.
-----------------------------------------
openSUSE -- en.opensuse.org/User:Terrorpup
openSUSE Ambassador/openSUSE Member
skype,twiiter,identica,friendfeed -- terrorpup
freenode(irc) --terrorpup/lupinstein
Have you tried SUSE Studio? Need to create a Live CD, an app you want
to package and distribute , or create your own linux distro. Give SUSE
Studio a try. www.susestudio.com.
More information about the Ale
mailing list