Hi Ben,

> I have a database table which includes a timestamp(14) field.
>
> I would like to construct an SQL statement that pulls out records
between
> two dates, based on this field (i.e. time is not important, date is).
>
> So a user input "01/01/2001" -> "01/01/2002" and I want to retrieve
all
> records that fall within this range, from a PHP web page.
>
> I have had a look at the timestamp page on mysql.com, but couldn't
find the
> answer there.
>
> Any suggestions please?


It is not apparent from your question, where the problem lies. Why not
show us what you have so far?
SQL is used to retrieve data from relational databases. Are you really
intending to retrieve FROM a web page?

If your difficulty is with the SQL phrasing: check out the keyword
BETWEEN (MySQL (or whichever) manual).
If it is with converting dates then check out the date/time functions
(PHP manual).

Regards,
=dn


---------------------------------------------------------------------
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