Created
August 16, 2018 14:59
-
-
Save sufian07/dfec6b3bb8ab7d60cb534a7ebe711569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $selects[] = rtrim( join( array_map( | |
| function ($custom_field) | |
| { | |
| $alias = 'custom' . $custom_field; | |
| return "(SELECT wcf.value FROM workorder_custom_fields as wcf" | |
| ." WHERE wcf.workorder_id=w.workorder_id" | |
| ." AND wcf.custom_label_id='". dbsafe($custom_field). "') as `$alias`, "; | |
| }, | |
| $customFields | |
| ), ''), ', '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment