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
> 


Ignore my hasty and wrong response from moments ago. you should be fine
if date_resolved is a datetime type column if it is only a date you
will need to use date_format to convert your date_sub(now()) to a date,
otherwise the later returns datetime and cannot be compared to just date.

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