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 2009-01-07 16:26:47

dgibson
Member
Registered: 2008-11-12
Posts: 10

Search inventory for a cd drive model

The components section of the computer inventory has the CD drive listed as a drive component with model the name (imported by ocs).  I'm trying to search for all of the computers that contain a particular model of drive.  I can't find a way to search based on the drives.  Am I missing something obvious?

Offline

#2 2009-01-07 17:11:20

Bug Reporter
Member
Registered: 2008-09-15
Posts: 79

Re: Search inventory for a cd drive model

I would use OCS for this query.  Unfortunately, storage model isn't an option in the search page so you'll need to query the database directly.  Use the following query:

select h.name, s.model 
from hardware as h, storages as s 
where h.id = s.id and s.model like '%model%';

Change the word "model" to the model number you're looking for.  You can also add columns as appropriate.  Maybe we can also get the OCS-NG team to add this field as a searchable element.  Thanks.


PROD: RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.3 -- OCS-NG 1.02.1/5003
DEV:   RHEL 5 on x86 32bit -- PHP 5.1.6 -- Apache 2.2.3 -- MySQL 5.0.77  --  GLPI 0.72.4 -- OCS-NG 1.02.1/5003

Offline

Board footer

Powered by FluxBB