con->begin($txf);

change to use transaction.