My code looks like this:
// Connect to SQLite DB
DB(\'/path/to/sqlite.db\');
DB(\'BEGIN TRANSACTION;\');
// These loops are just examples.
for ($i = 1; $i
Why do you use prepared statements if you "prepare" them in the loop ? (in the DB function)
Make a prepare befor the loop, and in the loop just give the values and execute. Of course this would require a rewrite of your DB method.
Oh and btw. is your ID column the primary key ? if so you have another problem couse "i" would be for 100 "j" the same :)
For example:
$sth = $dbh->prepare('INSERT INTO "test" ("id", "name") VALUES (:id, :name)');
$j=0;
for ($i = 1; $i <= 10000; $i++){
$j = ($j==100) ? 0 : $j++;
$sth->execute(array(':id' => $i, ':name' => 'Testing ' . $j));
}