rename items
parent
b21882eaa2
commit
55de09a7ae
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue