1
0
Fork 0
Manager/cron/checkInventar.php

21 lines
636 B
PHP
Raw Normal View History

2020-06-03 15:31:18 +00:00
<?php
2021-01-21 00:33:25 +00:00
$InventarCheckStatement = $RUNTIME['PDO']->prepare("UPDATE inventoryitems i SET
i.inventoryName = concat('[DEFEKT] ', i.inventoryName)
WHERE
i.assetID IN (
SELECT
i.assetID
FROM inventoryitems i
WHERE
NOT EXISTS( SELECT *
FROM fsassets fs
WHERE
fs.id = i.assetID
)
AND NOT i.inventoryName LIKE '[DEFEKT] %'
AND i.assetType <> 24
)");
2020-06-03 15:31:18 +00:00
2021-01-21 00:33:25 +00:00
$InventarCheckStatement->execute();
2020-06-03 15:31:18 +00:00
?>