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 2005-05-24 17:22:13

fouayeman
Member
Registered: 2005-04-19
Posts: 94

détail technique

heu voilà, il y a une requette que je ne comprend pas tout à fait, dans glpi/glpi/computers/functions et c'est dans la fct "showComputerList"

A quoi servent toutes les jointures, on ne récupère pas les device dans le select, on ne cherche pas non plus n ordi avec des périphériques internes précis,est-ce qu'on peut m'expliquer, je sui stombé làdessus en chechant si il y aavait une fonction qui faisait le lien entre un ordi et ses périphériques. merci!
                                             La Requête:

$query = "select DISTINCT comp.ID from glpi_computers as comp LEFT JOIN glpi_computer_device as gcdev ON (comp.ID = gcdev.FK_computers) ";
$query.= " LEFT JOIN glpi_device_moboard as moboard ON (moboard.ID = gcdev.FK_device AND gcdev.device_type = '".MOBOARD_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_processor as processor ON (processor.ID = gcdev.FK_device AND gcdev.device_type = '".PROCESSOR_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_gfxcard as gfxcard ON (gfxcard.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".GFX_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_hdd as hdd ON (hdd.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".HDD_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_iface as iface ON (iface.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".NETWORK_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_ram as ram ON (ram.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".RAM_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_sndcard as sndcard ON (sndcard.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".SND_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_drive as drive ON (drive.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".DRIVE_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_control as control ON (control.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".CONTROL_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_pci as pci ON (pci.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".PCI_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_case as Tcase ON (Tcase.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".CASE_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_power as power ON (power.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".POWER_DEVICE."') ";
$query.= " LEFT JOIN glpi_networking_ports on (comp.ID = glpi_networking_ports.on_device AND0  glpi_networking_ports.device_type='1') ";
$query.= " LEFT JOIN glpi_dropdown_netpoint on (glpi_dropdown_netpoint.ID = glpi_networking_ports.netpoint) ";
$query.= " LEFT JOIN glpi_dropdown_os on (glpi_dropdown_os.ID = comp.os) ";
$query.= " LEFT JOIN glpi_dropdown_locations on (glpi_dropdown_locations.ID = comp.location) ";
$query.= " LEFT JOIN glpi_enterprises ON (glpi_enterprises.ID = comp.FK_glpi_enterprise ) ";
$query.= " LEFT JOIN glpi_users as resptech ON (resptech.ID = comp.tech_num ) ";
$query.= " LEFT JOIN glpi_type_computers ON (glpi_type_computers.ID = comp.type ) ";
$query.= getInfocomSearchToRequest("comp",COMPUTER_TYPE);
$query.= getContractSearchToRequest("comp",COMPUTER_TYPE);
$query .= " where $where AND comp.deleted='$deleted' AND comp.is_template = '0'  ORDER BY $sort $order";

Offline

#2 2005-05-24 17:23:48

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: détail technique

Elles servent dans le cas ou on effectue une recherche sur les periphériques.
l'element de clause $where doit les utiliser.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2005-05-24 17:25:26

fouayeman
Member
Registered: 2005-04-19
Posts: 94

Re: détail technique

ok merci.

Offline

#4 2009-05-28 17:04:04

curieux
Member
Registered: 2009-04-02
Posts: 103

Re: détail technique

bonsoir, ou on peut trouvé la requête insert pour l'insertion des données dans une table?

Offline

Board footer

Powered by FluxBB