MySQL Active Record Fixed & Debug