I am trying to handle as much as possible inside the query since this is the fastest way of listing things in my current project.
Here's what I'm trying to do.
I have a table with stations:
id | station_call | station_band
--------+-----------------+-------------
1 | WABC | FM
2 | WXYZ | AM
Now normally, upon getting the resutls, it would be easy to just join the two with PHP to get the full station name
$row["station_call"] . "-" . $row["station_band"];
would result in WACB-FM and WXYZ-AM
Is there a way I can get this joining of the two inside the query?
Basically returning a new row, something like station_name and have the name already formated as WACB-FM
Bonus:
This probably makes it a bit harder, my query is also getting these results inside of a JOIN statement and processed as a GROUP_CONCAT()
Right now, I have two get separate GROUP_CONCATS() to return as two separate columns in each row resulting in "WABC, WXYZ" and "FM, AM" and having to explode the strings and join them based on index
Basically, I need it to be returned as a series of station names separated as a comma.
So when I get the final row, I'm trying to just reference $row["stations"] and get "WABC-FM, WXYZ-AM"
CONCAT()?conactis my bid too..GROUP_CONCAT()I didn't know you can useCONCAT()inside another similar function