Hi this is my table structure.
I need one result from this.
There is a field named LAPeriodStart in this table.
If LAPeriodStart date is 2009-01-05
Site Id is 4067
Today Date is 2009-12-07
1. Now I need to calculate LAPeriodStart Month from the date(2009-01-05) How its Possiblle?
2. If month of current date is one less then the month of LAPeriodStart then I need to show Current Status Due(means payment is due in next month as software processed all payments one month advance)
`lease_center` (
`SiteId` varchar(11) NOT NULL,
`Code` varchar(6) NOT NULL,
`OwnerName` varchar(100) NOT NULL,
`Mobile` varchar(100) NOT NULL,
`Landline` varchar(50) NOT NULL,
`LAD` varchar(3) NOT NULL,
`POD` varchar(3) NOT NULL,
`LA` varchar(40) NOT NULL,
`LAPeriodStart` date NOT NULL,
`LAPeriodEnd` date NOT NULL,
`PO` varchar(40) NOT NULL,
`POStartDate` date NOT NULL,
`POEndDate` date NOT NULL,
`BankACNo` varchar(100) NOT NULL,
`SPA` varchar(40) NOT NULL,
`SPAD` varchar(40) NOT NULL,
`ch` varchar(25) NOT NULL DEFAULT 'Click here to view',
`User` varchar(50) NOT NULL,
`time` time NOT NULL,
`Date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;