Merge pull request #10310 from AXeL-dev/patch-5

FIX run_sql function: support for numbers in database prefix
This commit is contained in:
Laurent Destailleur 2019-01-07 14:10:46 +01:00 committed by GitHub
commit ca2477a250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,7 +235,7 @@ function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='',
$newsql=$sql;
// Replace __+MAX_table__ with max of table
while (preg_match('/__\+MAX_([A-Za-z_]+)__/i',$newsql,$reg))
while (preg_match('/__\+MAX_([A-Za-z0-9_]+)__/i',$newsql,$reg))
{
$table=$reg[1];
if (! isset($listofmaxrowid[$table]))