forked from Wavyzz/dolibarr
Fix: change the last database prefix
This commit is contained in:
@@ -217,13 +217,13 @@ if ($resql)
|
||||
if (preg_match("/[13579]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "A0".$record['box_order'];
|
||||
$sql="update llx_boxes set box_order = '".$box_order."' where box_order = ".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE box_order = ".$record['box_order'];
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "B0".$record['box_order'];
|
||||
$sql="update llx_boxes set box_order = '".$box_order."' where box_order = ".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE box_order = ".$record['box_order'];
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
}
|
||||
@@ -232,13 +232,13 @@ if ($resql)
|
||||
if (preg_match("/[13579]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "A".$record['box_order'];
|
||||
$sql="update llx_boxes set box_order = '".$box_order."' where box_order = ".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE box_order = ".$record['box_order'];
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "B".$record['box_order'];
|
||||
$sql="update llx_boxes set box_order = '".$box_order."' where box_order = ".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE box_order = ".$record['box_order'];
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user