Made the result database on sql, more result code