In a MySQL table the id column is set to auto_increment and the next auto_increment is set to 128 in phpmyadmin, but any new rows added have 127 as the value in the id row. I have no idea why.
Changed the column from tiny-int to int and everything working now, cheers.