Cindy wrote:
> 

> 
> SELECT
>        Foster_Dogs.dog_name,
>        Foster_Dogs.dog_status,
>        Foster_Dogs.date_resolved,
>        Foster_Dogs.adopting_family,
>        Foster_Dogs.foster_paperwork,
>        Foster_Dogs.dog_id,
>        Adoption_Applications.firstname,
>        Adoption_Applications.lastname
> FROM Foster_Dogs, Adoption_Applications
> WHERE dog_status = "Adopted" AND adopting_family = app_id
>        AND (date_resolved > DATE_SUB(NOW(), INTERVAL 6 MONTH))  <<< bad line
> ORDER BY dog_name
>

you can't compare time date fields directly like that, you need
to convert them both to days or minutes or some common single number

AND ( to_days(date_resolved) > to_days(date_sub(now(),interval 6 month)) )

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