Hi all,
Having looked around for some time I can't find any previous posts which can help me solve my issue.
I have an MySQl table in which I use an "if" statement to change the data displayed in one of the columns.
The process kind of works but the column header contains the "if" statement. This is the query:
f.fn AS 'FND',
date_format(d.st, '%'H:%i) AS stm,
d.al aS 'ALN',
if(d.ad = 'x', 'I','O')
FROM Table1 f, Table2 d
WHERE f.fn = d.nfn
ORDER BY d.st
When the daya is displayed the column which holds the content of d.ad shows the column header "if(d.ad = 'x', 'I','O')" and not the colum name.
Can anyone give me some advise.
Thanks
Blackbox