Hi,

(Please note: NEWBIE WARNING, below questions might sound stupid, but feel
free to flame.) ;-)

I have a table "tbl_users" with a field "dat_an_time" which is a
timestamp(14).
In that I have values such as:
20040222000015
20040227042018
20040223015329
etc

I have searched google/the manual for the answers to the below questions but
I only found answers if
the field is a datetime field and not a timestamp, I cannot change the
format as I am the new
developer of an old (already live) project and lots of scripts are already
accessing this table.

Please tell me how to do this with my current setup.

Two questions:
Question 1.
In my php script I am taking the value of "days_last" which should run a
select query to display all the
records in the last $days_last days (for those of you who dont program in
PHP/Perl $days_last is the
variable that is a number which the user selects. eg: 10 or 5 or 35 etc)

How do I format the query to get the results from my "dat_an_time"
timestamp(14) field?

Question 2.
The client will be entering 2 fields in this format YYYYMMDD, how do I
"select * " for all records that
are between $T_field1 and $T_field2 from my "dat_an_time" timestamp(14)
my records are like this:
20040222000015
20040227042018
20040223015329

Any help, references to the manual or URLs will be appreciated.

Thanks in advance.
Ryan.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to