Using CONCAT_WS() With Server-Side Processing
Using CONCAT_WS() With Server-Side Processing
Hi, I have a question regarding server-side processing. I am attempting to format the data I receive by using CONCAT_WS within my select statement in the server-side processing php file (based off of your example), like this:
[code] "SELECT C.id, C.name, CONCAT_WS(', ', L.column1, L.column2, L.column3), C.date
FROM CONTACT C LEFT JOIN LEAD L ON C.id = L.contactid WHERE L.interestedin_l = 'Yes'
GROUP BY C.id
$sWhere
$sOrder
$sLimit;"
[/code]
However, at the top of the server-side processing file, what should I then place in aoColumns? Clearly, the array $aColumns = array('id', 'name', 'column1', 'column2', 'column3', 'date') is not accurate, but then again I don't know what else I could put since then 3rd column isn't really a single column. Any help you could give me would be appreciated.
Thanks!
[code] "SELECT C.id, C.name, CONCAT_WS(', ', L.column1, L.column2, L.column3), C.date
FROM CONTACT C LEFT JOIN LEAD L ON C.id = L.contactid WHERE L.interestedin_l = 'Yes'
GROUP BY C.id
$sWhere
$sOrder
$sLimit;"
[/code]
However, at the top of the server-side processing file, what should I then place in aoColumns? Clearly, the array $aColumns = array('id', 'name', 'column1', 'column2', 'column3', 'date') is not accurate, but then again I don't know what else I could put since then 3rd column isn't really a single column. Any help you could give me would be appreciated.
Thanks!
This discussion has been closed.
Replies
While at first sight those files look confusing it should not be that hard to customize it. And you might actually learn a bit doing so!
Or maybe an entry in the columns array of
"CONCAT_WS(', ', L.column1, L.column2, L.column3)"
could work.