You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-11-25 12:14:00

supporteny
Member
Registered: 2022-11-25
Posts: 1

Request SQL computer & documents

Hi there,
I am currently making SQL requests to display in a report the list of computers with a "donation" status.

However, I cannot make the connection with the number of documents attached.

the idea being to know the number of computers with the "donation" status with its serial number and if there is indeed an attache invoice.

Can you tell me what query I need to perform?

For information my current query is:

SELECT `glpi_computers`.`name` AS `name`, `Glpi Infocoms`.`inventory_date` AS `Glpi Infocoms__inventory_date`, `Glpi States`.`name` AS `Glpi States__name`, `Glpi Groups`.`completename` AS `Glpi Groups__completename`
FROM `glpi_computers`
LEFT JOIN `glpi_infocoms` `Glpi Infocoms` ON `glpi_computers`.`id` = `Glpi Infocoms`.`items_id` LEFT JOIN `glpi_users` `Glpi Users` ON `glpi_computers`.`users_id` = `Glpi Users`.`id` LEFT JOIN `glpi_states` `Glpi States` ON `glpi_computers`.`states_id` = `Glpi States`.`id` LEFT JOIN `glpi_groups` `Glpi Groups` ON `glpi_computers`.`groups_id` = `Glpi Groups`.`id`
WHERE (`Glpi Infocoms`.`itemtype` = 'Computer'
   AND (lower(`Glpi States`.`name`) like '%deee%'))


My GLPI Version is : 9.5.5
Serveur : Windows 2016 + IIS + MariaDB

Thanking you

Last edited by supporteny (2022-11-25 12:21:16)

Offline

Board footer

Powered by FluxBB