| @@ 1480-1487 (lines=8) @@ | ||
| 1477 | $cols[$col] = $col; |
|
| 1478 | continue; |
|
| 1479 | } |
|
| 1480 | if (($db_col = array_search($col,$this->db_cols)) !== false) |
|
| 1481 | { |
|
| 1482 | $cols[$db_col] = $col; |
|
| 1483 | } |
|
| 1484 | else |
|
| 1485 | { |
|
| 1486 | $cols[$col] = isset($this->db_cols[$col]) ? $this->db_cols[$col] : $col; |
|
| 1487 | } |
|
| 1488 | } |
|
| 1489 | } |
|
| 1490 | } |
|
| @@ 1496-1503 (lines=8) @@ | ||
| 1493 | foreach(is_array($extra_cols) ? $extra_cols : explode(',',$extra_cols) as $col) |
|
| 1494 | { |
|
| 1495 | if (stripos($col,'as ')!==false) $col = preg_replace('/^.*as +([a-z0-9_]+) *$/i','\\1',$col); |
|
| 1496 | if (($db_col = array_search($col,$this->db_cols)) !== false) |
|
| 1497 | { |
|
| 1498 | $cols[$db_col] = $col; |
|
| 1499 | } |
|
| 1500 | else |
|
| 1501 | { |
|
| 1502 | $cols[$col] = isset($this->db_cols[$col]) ? $this->db_cols[$col] : $col; |
|
| 1503 | } |
|
| 1504 | } |
|
| 1505 | } |
|
| 1506 | return $cols; |
|