'SELECT IF ( table.competition IN ( \'column1\', \'column2\', \'column3\', \'column4\' ), \'First\', table.competition ) AS competition, --- lots more code --- GROUP BY competition ORDER BY FIELD(table.competition,\'First\',\'FA Cup\',\'League Cup\') ASC ;');
This basically takes a lot numbers from columns 1,2,3,4 adds them up and displays them under First. Is it possible to add another if to the start of the query? I want to take info from columns 5 and 6 but this has to go under a different column to First.
SELECT IF ( table.competition IN ( \'column5\', \'column6\' ), \'Second\', table.competition )
Then the ORDER BY FIELD would change to
ORDER BY FIELD(table.competition,\'First\',\'FA Cup\',\'League Cup\',\'Second\') ASC
Does anyone know if that be done?