php mysql批量插入数据插入不完全,该怎么处理
Jun 13, 2016 pm 12:35 PM
access
mongodb
mysql
nbsp
php mysql批量插入数据插入不完全
我用的是mysqli,一口气需要插入52条记录,偶尔会漏掉几条没插入成功,现在这个表3.4M,如果把这个表清空就不会出现这种情况?
------解决方案--------------------
才53条就会漏???什么破代码啊,贴出来看看
另:为啥不用 pdo?
------解决方案--------------------
不是代码的问题,这个数据库你可以把它想像成access.所以丢失数据的状况就不难理解了.
如果你希望用小数据库,那麽我建议你看一下mongoDB,这玩意前景不错,而且挺小的.
------解决方案--------------------
mysql 和 access 不是一个级别的数据库好么?
为什么丢失数据,可以不难理解?mysql丢失数据,在53条这种情况下很难理解!
顺便,mongoDB 不是小数据库,它是 nosql,和 mysql 又不是一回事了。比如 foursquare 就用它来处理 几百G的客户地理信息。
- -,好奇,这勋章怎么拿的。
------解决方案--------------------
mongoDB 真心不是小数据库…………大起来是很恐怖的一个东西
另外52条就漏太夸张了
建议用事务处理看看
如果还漏就是代码有问题
------解决方案--------------------
嗲!
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?
3 weeks ago
By 王林
Two Point Museum: All Exhibits And Where To Find Them
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?
3 weeks ago
By 王林
Two Point Museum: All Exhibits And Where To Find Them
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to disable background applications in Windows 11_Windows 11 tutorial to disable background applications

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?
