This is a bit complex. I have two tables bus_status and routes
routes has a foriegn key look up from bus_status called UnitAssigned in routes table and it is pulled from the BusNumber field in the bus_status table.
Right now when I send an email and include the field in the message data it only provide the Bus number like this:
Bus Number: 0114
This is actually the record ID number of this bus number and not the real bus number which is AAOH_221
I need it to show the actual. When I am creating reports I do this with an inner join.. but I am not sure how to do this withing the code for the message below..
function routes_after_update($data, $memberInfo, &$args){
$fields_to_send = array('UnitAssigned', 'RouteNo', 'DriverAssigned', 'DriverAssignedpm', 'County', 'Monitor', 'Notes', 'SubAssigned1', 'SubAssigned2',);
foreach($fields_to_send as $field) {
$messageData2 .= "$field: {$data[$field]} \n";
}
Any Suggestions?
Thanks, Tina