Solved several problems with SQL

- the order by datetime is using the proper function on the ORDER BY
  clause.
- the INSERT is not formatting the params by hand.
- all the Panic()s are giving extra information to know where the error
  is located.