Fixed fatal error 'DB Error: no such field' on Contribution detail report
authorPradeep Nayak <pradpnayak@gmail.com>
Tue, 14 Aug 2018 14:36:02 +0000 (15:36 +0100)
committereileen <emcnaughton@wikimedia.org>
Mon, 3 Sep 2018 21:44:45 +0000 (09:44 +1200)
CRM/Report/Form.php

index f3dbf456e87b073fbf00e46df2d00e96dd9dc172..844c877ac68132084db316e761fac211d226d326 100644 (file)
@@ -5419,7 +5419,7 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
       ),
       'age' => array(
         'title' => $options['prefix_label'] . ts('Age'),
-        'dbAlias' => 'TIMESTAMPDIFF(YEAR, ' . $tableAlias . '.birth_date, CURDATE())',
+        'dbAlias' => 'TIMESTAMPDIFF(YEAR, ' . $tableAlias . '_civireport.birth_date, CURDATE())',
         'type' => CRM_Utils_Type::T_INT,
         'is_fields' => TRUE,
       ),