Hello again,
I relly new with databases and writing sql-questions.
But in my db want I to check what new rows have come the last hour.
the db-table (table name is SUBSCRIBER) have the following columns as follows:
ID email created updated
001 [EMAIL PROTECTED] 20050215131034 20050215133401
063 [EMAIL PROTECTED] 20050215141034 20050215141201
076 [EMAIL PROTECTED] 20050215134500 20050215134556
The data type of the columns are:
ID =VARCHAR(14)
email =VARCHAR(255)
created =VARCHAR(14)
updated =VARCHAR(14)
Now I would like to make a sql-question that show which new users have come the
last hour, without that I need to edit the question each time I want to ask.
(please, donr't blame me that the date columns (created updated) not are in
date format, I have not done the DB from the beginning, I am only tries to
solve some problem in it), I don't think it is possible to change these 2
columns to DATETIME format because then will the web program stop working,
but I would be greatfull for a work around solution that solve my problem.
Thanks Alec, for your quick answer but it dosn't helped me much, it list every
row any way. I have done my question like this (after your suggestion (or you
have to blame me that I'm stupid if it is not correct ;-))).
select CREATED from SUBSCRIBER where date_sub(now(), interval 1 hour) =
created;
What do I wrong??
/J.
Jesper wrote on 15/02/2005 13:15:43:
Hello,
I relly new with databases and writing sql-questions. But in my
db want I to check what have new rows have come the last hour.
the db have I as follow:
ID email created updated 001
[EMAIL PROTECTED] 20050215131034 20050215133401
063 [EMAIL PROTECTED] 20050215141034 20050215141201
76 [EMAIL PROTECTED] 20050215134500 20050215134556
Now I would like to make a sql-question that show which new users
have come the last hour, without that I need to edit the question
each time I want to ask.
select colums from table where date_sub(now(), interval 1 hour) =
created ;
Alec
--
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]