I have a query that brings though a list of passenger names, is there a way in which I can set the length of each of these names to equal 10 characters. So even if I have shorter names eg "bob, demarcus, adam and scott" they would display with the shorter names filled by spaces, eg:
bob |demarcus |adam |scott
My Query is:
(SELECT tb2.journey_dttm as departure, ('8' - tb2.occupancy) AS seats,
(SELECT IF(GROUP_CONCAT(passenger_name SEPARATOR '|') IS NULL, '', GROUP_CONCAT(passenger_name ORDER BY passenger_name SEPARATOR '|'))
FROM passengers WHERE journey_id = tb2.id ORDER BY passenger_name) AS passengers FROM shuttle AS tb1 LEFT JOIN journey AS tb2 ON ";
( tb1.id = tb2.shuttle_id ) LEFT JOIN trip_route AS tb3 ON ( tb2.route_id = tb3.id )
WHERE tb1.depart_dttm = '$depart_dttm' ORDER BY tb2.id ASC, tb2.route_id ASC);