As mentioned before you really should sue the date data type in mysql, or alternativly use an int and store the date as seconds since the epox, so that you can do simple math for this type of query. Any other way of storing dates is basically shooting yourself in the foot.

That said, if you choose to store it as a varchar use:

Select * from submissions where approvedate in ('07/01/2006', '07/02/2006', '07/03/2006',...);

Be aware how extremely slow this performs compared to the options mentioned above tho.


John Berman wrote:
Hi

I'm struggling with some logic

I have a table called: submissions and each record has an approvedate field
which stores the date mm/dd/yyyy

I want to display all records for 7 days only from their  approved date so I
guess something like

Select * from submissions were approvedate  - this is were im getting stuck

Pointers appreciated, im sure its simple ?

Regards

John B



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

Reply via email to