Help for this page
DROP TABLE IF EXISTS newtable; CREATE TABLE newtable SELECT T.time, T.name, T.last, P.company, P.wife FROM T JOIN P ON T.wife = P.wife and T.company = P.company;
$sql="DROP TABLE IF EXISTS newtable; CREATE TABLE newtable ... $sth->execute (); $sth->finish (); $dbh->disconnect ();