The only reason I can see for the error is if the SearchLog table doesn't exist or the TS column doesn't exist.
Try printing $GT::SQL::error from within your global after $db->select;
Try printing $GT::SQL::error from within your global after $db->select;