CREATE TABLE IF NOT EXISTS adodb_error (
  created datetime NOT NULL ,
  sql0 varchar(250) NOT NULL,
  sql1 text NOT NULL,
  params text NOT NULL,
  tracer text NOT NULL,
  timer decimal(16,6) NOT NULL ,
  users varchar(20) NOT NULL 
) ENGINE=MyISAM ;

INSERT INTO adodb_error SELECT * FROM adodb_logsql WHERE tracer like '%error%' OR sql1 like 'ROLLBACK';