newphpbees
28 Mar 2012, 11:53 PM
Hi..
I need help in concatenation.
here is my code:
SELECT (SUM(TIMESTAMPDIFF(DAY, chemicalweighing_dateEntry, NOW()))), (SUM(TIMESTAMPDIFF(HOUR, chemicalweighing_dateEntry, NOW()))) - (SUM(TIMESTAMPDIFF(DAY,chemicalweighing_dateEntry, NOW())) * 24) AS age_day FROM kanban_data;
the output of this is:
57 204
they are separated in between two columns.
I want to combine them in one column like this:
57 day(s) 204 hr(s) ago
Thank you
I need help in concatenation.
here is my code:
SELECT (SUM(TIMESTAMPDIFF(DAY, chemicalweighing_dateEntry, NOW()))), (SUM(TIMESTAMPDIFF(HOUR, chemicalweighing_dateEntry, NOW()))) - (SUM(TIMESTAMPDIFF(DAY,chemicalweighing_dateEntry, NOW())) * 24) AS age_day FROM kanban_data;
the output of this is:
57 204
they are separated in between two columns.
I want to combine them in one column like this:
57 day(s) 204 hr(s) ago
Thank you