diff --git a/application/libraries/Datatables.php b/application/libraries/Datatables.php index 161cdbc..30ceb1c 100644 --- a/application/libraries/Datatables.php +++ b/application/libraries/Datatables.php @@ -65,6 +65,7 @@ public function select($columns, $backtick_protect = TRUE) { foreach($this->explode(',', $columns) as $val) { + $val = trim(preg_replace('/\s+/', ' ', $val)); // Remove New Lines $column = trim(preg_replace('/(.*)\s+as\s+(\w*)/i', '$2', $val)); $column = preg_replace('/.*\.(.*)/i', '$1', $column); // get name after `.` $this->columns[] = $column;