asset_report.php 712 B

1234567891011121314151617
  1. <?php
  2. $assetSql = "SELECT *,
  3. asset.CreatedAt AS AssetCreatedAt,
  4. asset.UpdatedAt AS AssetUpdatedAt,
  5. assetcategory.CreatedAt AS AssetCategoryCreatedAt,
  6. assetcategory.UpdatedAt AS AssetCategoryUpdatedAt
  7. FROM asset asset
  8. JOIN assetcategory assetcategory ON assetcategory.AssetCategoryID =asset.AssetCategoryID
  9. WHERE asset.IsActive='1' $assetSqlfilter";
  10. $assetRes = mysqli_query($conn, $assetSql);
  11. if ($assetRes->num_rows > 0) {
  12. $id = 0;
  13. foreach ($assetRes as $assetrow) {
  14. $id++;
  15. $assets = array_merge($assets, array(array($id, $assetrow['AssetID'], $assetrow['AssetName'], $assetrow['IsInServiceCenter'], $assetrow['AssetCategoryTitle'], $assetrow['AssetCreatedAt'], $assetrow['AssetUpdatedAt'])));
  16. }
  17. }