Closed ghost closed 8 years ago
If you try to insert rows into a database (MySQL and SQLite) like so:
$users = $database->table('users'); for ($i = 0; $i < 5; $i++) { $users->insert(array('username' => 'john')); }
only 1 row is inserted. There are no exceptions or errors. If, however, you change the insert statement within the loop to reference the table directly:
for ($i = 0; $i < 5; $i++) { $database->table('users')->insert(array('username' => 'john')); }
then 5 rows are inserted as expected.
This behavior was introduced with Kirby 2.3.0 (2.2.3 has no such problem). Is this intended behavior?
No, this is not intended. Please check if #171 fixes this issue for you, that would help a lot.
Yes, thank you! #171 fixes this.
If you try to insert rows into a database (MySQL and SQLite) like so:
only 1 row is inserted. There are no exceptions or errors. If, however, you change the insert statement within the loop to reference the table directly:
then 5 rows are inserted as expected.
This behavior was introduced with Kirby 2.3.0 (2.2.3 has no such problem). Is this intended behavior?