[TYPO3-english] pt_extlist use daysInYear to sort dates

Sebastian Gärtner sg at esea.co.tz
Fri Mar 20 08:02:35 CET 2015


Hi, 
Am trying to set up pt_extlist to give me a list sorted and sortable by the daysInYear (php is using %j in its strftime function)
I dont really get what i can access with the field definition

fields {
	    field1 {  
              table = table1
	      field = field1
	      isSortable = 1
	    }
}

Is this the pure access to one column eg. field or can i access something that i define in the baseFromClause
Lets say this would work

baseFromClause (
			SELECT
				domain,
				years_paid,
				date_registered,
				date_registered + INTERVAL(YEAR(CURRENT_TIMESTAMP) - YEAR(date_registered)) + 0 YEAR AS currPeriod,
				date_registered + INTERVAL(YEAR(CURRENT_TIMESTAMP) - YEAR(date_registered)) + 1 YEAR AS nextPeriod
			)

It works in phpMyAdmin when i add the FROM clause which is not needed in baseFromClause or am i wrong?

Now my question is can i define nextPeriod as a field and use as a column. What do i have to do to use it as a column?


More information about the TYPO3-english mailing list