Last number being retrieved from the history tbl.

Not yet tested to be fully functional