I am attempting to pull all years and terms from database except the last term
        Posted  
        
            by 
                Jonathan Moriarty
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jonathan Moriarty
        
        
        
        Published on 2012-06-26T15:12:05Z
        Indexed on 
            2012/06/26
            15:15 UTC
        
        
        Read the original article
        Hit count: 299
        
I have a logic problem: We have a database that has a donations table with name, address, last donation year, and last donation term (Spring and Fall). We want to pull all donors unless they donated in the last term (Spring or Fall). I have been trying to figure out the logic of pulling all years up to the current year while omitting the last term. So for example this year is 2012 and we are in the Spring term (I defined the spring term between 1/1 and 6/30) so I only want to display donors before and including spring 2011 (we will exclude the current term which is spring 12 and the last term which is fall 2011). The problem is I want to pull sprig 2011, fall 2010, spring 2010 etc, but only omit the current term and last term donated.
© Stack Overflow or respective owner