Thread: Delete Query
View Single Post

  #5 (permalink)  
Old 03-26-2008
Mark Huizer
 
Posts: n/a
Default Re: Delete Query

> SQL query:
> SELECT *
> FROM jos_content
> WHERE state = -1
> AND DATE_ADD( publish_down, INTERVAL '90'
> DAY ) = CURRENT_DATE
> LIMIT 0 , 30
>
> when I run the query for state only I get
> 21,705 rows where most of these have been unpulished for 90 days or
> more


I think 'or more' is the importnt thing here. You look for rows
_exactly_ 90 days ago.

mark

--
Terantula - Industrial Strength Open Source - http://www.terantula.com/
Projects and administration - +31 6 5140 5160
Reply With Quote