Home  >  Q&A  >  body text

mysql - MYISAM怎么保证数据的完整性

PHP中文网PHP中文网2728 days ago714

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 13:05:17

    If you choose to use the MYISAM engine but want to ensure the integrity of the data, you can only check it by writing your own data verification code. There are also methods of using temporary tables/intermediate tables on the Internet.
    ε-(´・`)========
    If you switch to innodb, please put your operations on the data in a, b, and c in the same transaction.

    开始使用事务
    ...A酱blablabla
    ...B酱blablabla
    ...C酱blablabla
    事务结束,提交
    

    Also: Although innodb provides the function of transaction rollback, please notetry not to perform discontinuous business operations in the transaction, such as calling core third-party interfaces...( ´_`.), after all, the only thing you can remove is your database.

    reply
    0
  • Cancelreply