First, check that the two configure.php files have the same URLs, databases etc.

/includes/configure.php
/admin/includes/configure.php

Check the orders_total table in your database does contain an orders_id for the ot_total in the class field ...

Check that the orders_total_id field in the orders_total table of your database is set to auto_increment in the Extra column ...