在sqlite中插入太多数据

时间:2013-03-04 16:42:19

标签: php mysql sqlite

我通过保持刷新浏览器继续将数据插入到表t1中。插入大约30条记录后,返回错误103。

<?php

function string($s, $quote = FALSE) 
{
    if ($s === NULL) return 'NULL';
    $r = sqlite_escape_string($s);
    if ($quote) return "'".$r."'";
    return $r;
}
if ($db = sqlite_open('fs.db', 0666, $sqliteerror)) 
{ 
    $sqlCreate = "create table t1   (id char(13) NOT NULL,path char(255) NOT NULL,PRIMARY KEY (id))";
    $id = uniqid("");
    $p = "hellovimal";
    $prevsql = sprintf("INSERT INTO t1 (id, path) VALUES (%s,%s)",string($id, TRUE), string($p, TRUE));
    $result = sqlite_query( $prevsql,$db, SQLITE_NUM, $err);

} 
else 
{
    die($sqliteerror);
}

这是截图 enter image description here

为什么在插入大约35条记录后会发生这样的错误以及如何修复它?

0 个答案:

没有答案
相关问题