1
0
Fork 0

rename items

master
Christopher Latza 2020-06-08 21:17:52 +02:00
parent b21882eaa2
commit 55de09a7ae
1 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,12 @@ while($InventarObjektRow = $InventarObjektStatement->fetch())
}else{
if((left($InventarObjektRow['inventoryName'], 8) == '[DEFEKT]'))
{
echo " ==> Rename '".$InventarObjektRow['inventoryName']."' -> '".str_replace("[DEFEKT] ", "", $InventarObjektRow['inventoryName'])."'\n";
$newName = str_replace("[DEFEKT] ", "", $InventarObjektRow['inventoryName']);
$renameQuery = $RUNTIME['PDO']->prepare("UPDATE inventoryitems SET inventoryName = ? WHERE inventoryID = ? AND assetID = ?");
$renameQuery->execute(array(substr($newName, 0, 64), $InventarObjektRow['inventoryID'], $InventarObjektRow['assetID']));
echo " ==> Rename '".$InventarObjektRow['inventoryName']."' -> '".$newName."'\n";
}
}
}else{