select * from statsa where aref='JJ1234'INSERT INTO statsa (aref,astart,alast,atct,apct,aact,asct,abct) VALUES('JJ1234','2010/09/03','2010/09/03',215,155,57,3,0) on duplicate key UPDATE alast='2010/09/03',atct=215,apct=155,aact=57,asct=3,abct=0