Moving vps last few days caused a headache with some sql-modes, every time i turned it off the host would switch it back on 10 minutes later so i decided to run through the exception log and make it sql strict mode compliant. With future sql  enabling strict mode here is what i did.

First invalid dates - All TT users should do this

Make 2 database backups, rename one file master and leave it somewhere safe. The second one open in a editor like notepad+ and search/replace all the follwing

datetime NOT NULL DEFAULT '0000-00-00 00:00:00'

notice we leave the ; out off the end

replace all with
datetime DEFAULT NULL


then search all
'0000-00-00 00:00:00'


replace all with
NULL



Secondly backslashes (my code is different and this is not important) you do NOT need to do this but its good practice going forward.
Sql needs the table names with backslashes -  on sql 8 for some reason groups is a keyword so that causes error - i had to change the 6 group querys

example - for show only
function classlist()
{
   $ret = array();
   $res = $this->pdo->run("SELECT * FROM groups ORDER BY group_id ASC");
   while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
       $ret[] = $row;
   }
   return $ret;
}


and the example of backslashes around groups
function classlist()
{
   $ret = array();
   $res = $this->pdo->run("SELECT * FROM `groups` ORDER BY group_id ASC");
   while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
       $ret[] = $row;
   }
   return $ret;
}