1
0
Fork 0
Manager/cron/checkInventar.php

20 lines
629 B
PHP
Raw Normal View History

2020-06-03 15:31:18 +00:00
<?php
2023-08-27 03:31:32 +00:00
$InventarCheckStatement = $RUNTIME['PDO']->prepare("UPDATE inventoryitems i SET
2021-01-21 00:33:25 +00:00
i.inventoryName = concat('[DEFEKT] ', i.inventoryName)
WHERE
2023-08-27 03:31:32 +00:00
i.assetID IN (
SELECT
2021-01-21 00:33:25 +00:00
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
2023-08-27 03:31:32 +00:00
$InventarCheckStatement->execute();