AnsweredAssumed Answered

Trouble making an Audit Report

Question asked by Giovanni Marazzi on Feb 7, 2019
Latest reply on Feb 8, 2019 by Giovanni Marazzi

Greetings, Developers


I've been trying to adapt this documentation to create a report on contacts audit but suger insist my query is wrong.

  IFNULL(,'') as 'Id',
  IFNULL(,'') as 'Nome',
  IFNULL(ca.date_created,'') as 'Data criado',
  IFNULL(ca.created_by,'') as 'Criado por',
  IFNULL(ca.field_name,'') as 'Campo mudado',
  IFNULL(ca.before_value_string,'') as 'Antes',
  IFNULL(ca.after_value_string,'') as 'Depois'
  contacts as c
  INNER JOIN contacts_audit as ca ON ca.parent_id =
  ca.date_created >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
  AND c.deleted = 0

Every help is appreciated.