Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
513d9be396
|
@ -254,6 +254,7 @@ abstract class AppResource extends Resource implements RetrieveInterface, Create
|
|||
$db_name = $database->getDatabaseName();
|
||||
|
||||
// Ottiene il valore successivo della colonna di tipo AUTO_INCREMENT
|
||||
$database->query('ANALYZE TABLE '.prepare($table_name));
|
||||
$next_autoincrement = $database->fetchOne('SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '.prepare($table_name).' AND TABLE_SCHEMA = '.prepare($db_name))['AUTO_INCREMENT'];
|
||||
|
||||
/*
|
||||
|
@ -291,6 +292,10 @@ abstract class AppResource extends Resource implements RetrieveInterface, Create
|
|||
$step['end'] = $next_autoincrement - 1;
|
||||
}
|
||||
|
||||
if ($step['end'] == '-1') {
|
||||
$step['end'] = $next_autoincrement;
|
||||
}
|
||||
|
||||
if ($step['end'] >= $step['start']) {
|
||||
$total = array_merge($total, range($step['start'], $step['end']));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue